Machine Learning-Bias And Variance In Depth Intuition| Overfitting Underfitting

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ม.ค. 2025

ความคิดเห็น • 462

  • @heartsbrohi9394
    @heartsbrohi9394 4 ปีที่แล้ว +198

    Good turorial. My thoughts below (hope it adds to someone's understanding):
    We perform cross validation (to make sure that model has good accuracy rate and it can be used for prediction using unseen/new or test data). To do so, we use train and test data by properly splitting our dataset for example 80% for training, 20% for testing the model. This can be performed using train_test, train_test_split or K-fold (K-fold is mostly used to avoid under and overfiting problems).
    A model is considered as a good model when it gives high accuracy using training as well as testing data. Good accuracy on test data means, model will have good accuracy when it is trying to make predictions on new or unseen data for example, using the data which is not included in the training set.
    Good accuracy also means that the value predicted by the model will be very much close to the actual value.
    Bias will be low and variance will be high when model performs well on the training data but performs bad or poorly on the test data. High variance means the model cannot generalize to new or unseen data. (This is the case of overfiting)
    If the model performs poorly (means less accurate and cannot generalize) on both training data and test data, it means it has high bias and high variance. (This is the case of underfiting)
    If model performs well on both test and training data. Performs well meaning, predictions are close to actual values for unseens data so accuracy will be high. In this case, bias will be low and variance will also be low.
    The best model must have low bias (low error rate on training data) and low variance (can generalize and has low error rate on new or test data).
    (This is the case for best fit model) so always have low bias and low variance for your models.

    • @karthikparanthaman634
      @karthikparanthaman634 4 ปีที่แล้ว +2

      Wonderful summary!

    • @farhathabduljabbar9879
      @farhathabduljabbar9879 3 ปีที่แล้ว +8

      You should probably create articles coz you are good at summarising concepts!
      If you have one please do share!

    • @adegboyemoshood809
      @adegboyemoshood809 3 ปีที่แล้ว

      Great

    • @roshanid6523
      @roshanid6523 3 ปีที่แล้ว +1

      Very well written 👍🏻
      Thanks for sharing
      👍🏻 Consider writing blogs

    • @AnandKumar-to6ez
      @AnandKumar-to6ez 3 ปีที่แล้ว +1

      Really very nice and well written. After watching video, if we go through your summery, its a stamp on our brains. Thanks to both for your efforts.

  • @sandipansarkar9211
    @sandipansarkar9211 4 ปีที่แล้ว +238

    This video need to be watched again and again.Machine learning is nothing but proper understanding of ovrfitting and underfitting..Watching the second time.Thanks Krish

    • @adipurnomo5683
      @adipurnomo5683 3 ปีที่แล้ว +4

      Ageeed!

    • @batman9937
      @batman9937 3 ปีที่แล้ว +7

      This is what they asked me in OLA interview. And the interviewer covered great depth on this topic only. It's pretty fundamental to ML. Sad to report they rejected me though.

    • @ashishbomble8547
      @ashishbomble8547 3 ปีที่แล้ว

      @@batman9937 hi man plz help to know what other questions they asked .

    • @carti8778
      @carti8778 2 ปีที่แล้ว +2

      @@ashishbomble8547 buy the book :: ace the data science interview by Kevin Huo and nick singh .

  • @rafibasha1840
    @rafibasha1840 3 ปีที่แล้ว +41

    Hi Krish,thanks for the explanation ..6:02 it should be high bias and low variance in case of under fitting

    • @mohitzen
      @mohitzen 2 ปีที่แล้ว +4

      Yes exactly i was looking for this comment

    • @singhvianuj
      @singhvianuj 2 ปีที่แล้ว

      Amazing video by Krish. Thanks for pointing out this. @Krish Naik please make a note of this

    • @shailzasharma5619
      @shailzasharma5619 2 ปีที่แล้ว

      yess!!!

    • @rohitkumar-gi8bo
      @rohitkumar-gi8bo 2 ปีที่แล้ว

      yess

    • @Ramy_Abc
      @Ramy_Abc 2 ปีที่แล้ว

      Exactly! I searched for this comment :)

  • @emamulmursalin9181
    @emamulmursalin9181 3 ปีที่แล้ว +33

    At 06:08 it is said that the underfitted data, the model has high bias and high variability. To my understanding, the information is not correct.
    Variance is the complexity of a model that can capture the internal distribution of the data points in the training set. When variance is high, the model will be fitted to most (even all) of the traiining data points. It will result in high training accruacy and low test accuracy.
    So in summary :
    When the model is overfitted : Low bias and high variance
    When the model is underfitted :High bias and Low variance
    Bias : The INABILITY of the model to be fit on the training data
    Variance : The complexity of the model which helps the model to fit with the training data.

    • @tejanarora1221
      @tejanarora1221 3 ปีที่แล้ว +2

      yes bro, you are correct

    • @rohitkumarchoudhary
      @rohitkumarchoudhary 3 ปีที่แล้ว

      I also have same doubt. @Krish Naik sir , please have a look on it.

    • @swapnilparle1391
      @swapnilparle1391 3 ปีที่แล้ว +1

      But under fitting suppose to have low accuracy of training data know ? Confusing !!

    • @prachinainawa3055
      @prachinainawa3055 3 ปีที่แล้ว +1

      Have I learned the wrong definition of bias and variance by krish sir's explanation? Now I am confused😑

    • @swapnilparle1391
      @swapnilparle1391 3 ปีที่แล้ว

      @prachi... not at all concept is at the end same

  • @westrahman
    @westrahman 4 ปีที่แล้ว +22

    XGBoost, the answer cant be simple, but what happens is when dealing with high bias, do better feature engineering n decrease regularization, so in XGBoost we increase depth of each tree and other techniques to handle it to minimize the loss...so you can come to conclusion that if proper parameters are defined (including regularization etc) it ll yield low bias and low variance

  • @shashankverma4044
    @shashankverma4044 4 ปีที่แล้ว +15

    This was my biggest doubt and you clarified it in so easy terms. Thank you so much Krish.

  • @vatsal_gamit
    @vatsal_gamit 4 ปีที่แล้ว +18

    at 6:10 you made it all clear to me in just 2 lines!! Thank you for this video :)

  • @ellentuane4068
    @ellentuane4068 3 ปีที่แล้ว +8

    Can't express my gratitude enough ! Thank you for explaining it so well

  • @vinayakbachal8134
    @vinayakbachal8134 3 ปีที่แล้ว +2

    bhai, tu bahot sahi hai, 2.80 lacs fees bharke jo baat nahi samzi easily wo tumne 16 minutes me bata di..kudos..amazing word dear, all the very best

  • @anoopak007
    @anoopak007 3 ปีที่แล้ว +1

    Please note that Underfitting occurs when we have HIGH BIAS and LOW VARIANCE.... except that error this video is an excellent one. Thanks.

    • @ramshaazeemi8851
      @ramshaazeemi8851 3 ปีที่แล้ว

      In underfitting, model performs poor on test data as well then why it has low variance. If variance = test error?

    • @anoopak007
      @anoopak007 3 ปีที่แล้ว

      As per my understanding, variance does not actually mean the test error, but the change in test error when the test data is modified. Bcoz in underfitting, the model is too much generalized so that even if we change the test data greatly also, we moreover get the same test error. Somebody correct me if I'm wrong.

  • @MrAli2200
    @MrAli2200 3 ปีที่แล้ว +1

    You can't get a clearer explanation than this, hats off mate

  • @chimadivine7715
    @chimadivine7715 3 หลายเดือนก่อน

    Krish, your videos hit the nail on the head. You explained the meaning of bias and variance. Thanks a lot!

  • @kaushalpatwardhan
    @kaushalpatwardhan 3 ปีที่แล้ว +2

    I have been trying to understand this concept since long ... But never knew its this simple 😀 thank u Krish for this amazingly simple explanation to understand.

  • @kajalkush1210
    @kajalkush1210 3 ปีที่แล้ว +1

    Way of explanation is woww.

  • @cheeku5568
    @cheeku5568 4 ปีที่แล้ว +2

    One video all clear content... thanks bro it was really a nice session.. u really belong to low bias n low variance human. Keep posting such clear ML videos..

  • @bakerkar
    @bakerkar ปีที่แล้ว

    excellent tutorial. better than IIT professors who r teaching machine learning.

  • @YashSharma-es3lr
    @YashSharma-es3lr 3 ปีที่แล้ว

    sir after watching this video , mera confusion ek baar mein clear ho gya between bias and variance , awsome explaination

  • @dishashaktawat2219
    @dishashaktawat2219 4 ปีที่แล้ว

    providing these info makes you a great teacher... the way you explain everything going to brain.....

  • @eswaranthanabslan2607
    @eswaranthanabslan2607 3 ปีที่แล้ว

    Krish, you are a master in statistics and machine learning

  • @DS_AIML
    @DS_AIML 4 ปีที่แล้ว +50

    Underfitting : High Bias and Low Variance
    OverFitting : Low Bias and High Variance
    and Generalized Model : Low Bias & Low Variance.
    Bias : Error from Training Data
    Variance : Error from Testing Data
    @Krish Please confirm

    • @videoinfluencers3415
      @videoinfluencers3415 4 ปีที่แล้ว +1

      I am confused ...
      It means that underfitted model has high accuracy on testing data?

    • @akashhajare223
      @akashhajare223 4 ปีที่แล้ว +8

      Underfitting : High Bias and HIGH Variance

    • @kiran082
      @kiran082 4 ปีที่แล้ว +4

      @@videoinfluencers3415 I mean under fitting model has low accuracy on Testing and Training Data and the difference between the Training accuracy and test accuracy is very less, that's why we get low variance and high biased in Under fitting models.

    • @hiteshchandra156
      @hiteshchandra156 4 ปีที่แล้ว

      You are correct bro I checked on Wikipedia also..and in some different sources too.
      @Krish Please Confirm.

    • @sindhutirth
      @sindhutirth 4 ปีที่แล้ว +2

      If it makes it any clear for other learners, here's my explanation...
      BIAS is the simplifying assumptions made by a model to make the target function (the underlying function that the ML model is trying to learn) easier to learn.
      VARIANCE refers to the changes to the estimate of the target function that occur if the dataset is changed when implementing the model.
      Considering the linear model in the example, it makes an assumption that the input and output are related linearly causing the target function to underfit and hence giving HIGH BIAS ERROR.
      But the same model when used with similar test data, will give quite similar results and hence giving LOW VARIANCE ERROR.
      I hope this clears the doubt.

  • @satishbanka
    @satishbanka 4 ปีที่แล้ว

    One of the best explanations of Bias and Varianace w.r.t Overitting and underfitting...

  • @khursiahzainalmokhtar225
    @khursiahzainalmokhtar225 2 ปีที่แล้ว +1

    What an excellent explanation on bias and variance. I finally understood both terms. Thank you so much for the video and keep up the good work!

  • @Hitesh-Salgotra
    @Hitesh-Salgotra 4 ปีที่แล้ว +4

    krish sir i hope God bless you with whole heart you are doing great job and thanks for the INEURON it made my life easy.

  • @garath
    @garath 3 ปีที่แล้ว +8

    Very thorough and good explanation! Thank you.
    Side note: Would like to point out that 2:12 the degree of polynomial is still 2 (its still a quadratic function).

  • @rajeshrajie1237
    @rajeshrajie1237 4 ปีที่แล้ว +1

    Bias is an error on training data ,
    variance is an error on test data. Thanks for simplifying

  • @ravibhat2849
    @ravibhat2849 4 ปีที่แล้ว +21

    Beautifully explained.
    But in underfitting, model shows High Bias and Low variance instead of high variance.

    • @krishnaik06
      @krishnaik06  4 ปีที่แล้ว +17

      Yes u r right...made a minor mistake

    • @namansinghal3685
      @namansinghal3685 4 ปีที่แล้ว

      @@krishnaik06 But then sir you said Bias is error and in underfitting training data error is low.. so should it be low bias?

    • @ravibhat2849
      @ravibhat2849 4 ปีที่แล้ว

      @@namansinghal3685 when data has high bias, it misses out on certain observations.. So the model will be underfit..

    • @jitenderthakur697
      @jitenderthakur697 4 ปีที่แล้ว

      @@namansinghal3685 in case of underfitting training error is high..not low

    • @gourav.barkle
      @gourav.barkle 4 ปีที่แล้ว +1

      @@krishnaik06 You should pin this comment

  • @chandrachalla3466
    @chandrachalla3466 2 ปีที่แล้ว +1

    This is an awesome video - was fully confused earlier - this video made it all clear !! Thanks a lot sir !!

  • @pavithrad9543
    @pavithrad9543 3 ปีที่แล้ว

    Krish thankyou so much., this is the best channel for data science that I ever seen. Great efforts Krish. Thanks again.

  • @72akshayvasala59
    @72akshayvasala59 3 ปีที่แล้ว

    U are Reallly great sir ... ur explanation is very much Crystal Clear

  • @freshersadda8176
    @freshersadda8176 3 ปีที่แล้ว +4

    2:30 - underfitting and overfitting
    6:10 - Bias variance

  • @ritikkumar876
    @ritikkumar876 ปีที่แล้ว +1

    very good explanation

  • @k_dash99
    @k_dash99 3 ปีที่แล้ว

    tbh, best video on youtube about Bias And Variance.

  • @bauyrjanjyenis3045
    @bauyrjanjyenis3045 2 ปีที่แล้ว +1

    Very succinct explanation of the very fundamental ML concept. Thank you for the video!

  • @vannelamallesh7635
    @vannelamallesh7635 3 หลายเดือนก่อน

    Thank you very much sir fir your clear explaination on bias variance underftting and over fitting on many parameters

  • @delwarhossain43
    @delwarhossain43 4 ปีที่แล้ว +1

    Very important discussion on important words in ML. Thanks. Easy explanation on hard words.

  • @milanbhor2327
    @milanbhor2327 7 หลายเดือนก่อน

    The most clear and precise information 🎉 thank you sir❤

  • @dehumanizer668
    @dehumanizer668 3 ปีที่แล้ว

    Krish is best fit teacher!

  • @aseemjain007
    @aseemjain007 6 หลายเดือนก่อน

    Brilliantly explained !! Thank you !!

  • @sauravb007
    @sauravb007 4 ปีที่แล้ว +40

    XGBoost should have low bias & low variance !

    • @brahmihassane8499
      @brahmihassane8499 3 ปีที่แล้ว

      Not really it will depend how do you tune the hyperparameters of the model, for this reason it is important to tune a model in order to find a compromise that ensure a low biais (capacity of the model to fit a theoritical function) and low variance (capacity of model to generalisation)

  • @kumarssss5
    @kumarssss5 4 ปีที่แล้ว +2

    Excellent teaching

  • @gunjalvis
    @gunjalvis 2 ปีที่แล้ว

    ultimate discussion and person who discussed

  • @sampurngyaan2867
    @sampurngyaan2867 2 ปีที่แล้ว

    It was really good video and it clears all the doubts I have.

  • @nevillesantamaria7487
    @nevillesantamaria7487 3 ปีที่แล้ว

    Beautifully explained. My concept are now clear on Over fitting and Under fitting models. 👍 Thanks 🍻

  • @sabaamin6442
    @sabaamin6442 2 ปีที่แล้ว

    woow awesome, great work done in one single video. insightful

  • @kanhataak1269
    @kanhataak1269 4 ปีที่แล้ว +1

    After watching this video doubt is clear really helping this. And Thanks given ur precious time...

  • @yashkhandelwal6558
    @yashkhandelwal6558 4 ปีที่แล้ว +1

    Great I learnt by watching your entire playlist.

  • @arpitadas6221
    @arpitadas6221 ปีที่แล้ว

    bestttt ...sir please make videos like this means in board....its better to understand this way

  • @souravbiswas6892
    @souravbiswas6892 2 ปีที่แล้ว

    XGBoost has the property of low bias and high variance, however it can be regularised and turned into low bias and low variance. Useful video indeed.

  • @The_Pavanputra
    @The_Pavanputra 2 ปีที่แล้ว

    Bias is in training data set and variance is in testing dataset - this line costed me linkedin machine learning job

  • @kamaleshp6154
    @kamaleshp6154 2 ปีที่แล้ว

    Best Explanation on Bias and Variance!

  • @yourtube92
    @yourtube92 ปีที่แล้ว

    Very good video, easiest video for understanding logic of bias & variance.

  • @jeffvarghese7657
    @jeffvarghese7657 2 ปีที่แล้ว

    excellent lectures, Krish. Great

  • @IonidisIX
    @IonidisIX ปีที่แล้ว

    On the last graph you show, Error vs Degree Of Polynomials, you mixed the curves. The red one is for the training dataset whereas the blue is for the test dataset.

  • @abdelwahabfaroug9656
    @abdelwahabfaroug9656 2 ปีที่แล้ว

    very useful lecture , it helps me much to understand this topic in a simple and easy way please keep going

  • @hemdatascience369
    @hemdatascience369 2 ปีที่แล้ว

    Today, I got clarity about this Topic, Tq u sir

  • @malikumarhassan1
    @malikumarhassan1 2 ปีที่แล้ว

    Perfectly explain sir

  • @ayushmaheshwari8793
    @ayushmaheshwari8793 3 ปีที่แล้ว

    Very intuitive explanation.

  • @teegnas
    @teegnas 4 ปีที่แล้ว +2

    I really love his in-depth intuition videos ... compared to his plethora of videos!

  • @rachitsingh4913
    @rachitsingh4913 3 ปีที่แล้ว

    This video is great but one thing i want to correct , bias and variance works in inversely proportional manner like if we got high variance , bias will be low or High bias than variance will be low. So in Overfitting its High variance/Low Bias and in Underfitting High Bias/Low variance.
    In order to be best it should be low biased/low variance

  • @nahidzeinali1991
    @nahidzeinali1991 2 ปีที่แล้ว

    your are so awesome, I love your teaching

  • @jiviteshvarshney3644
    @jiviteshvarshney3644 ปีที่แล้ว +2

    6:00 Small correction in your video.
    Underfitting - High Bias & Low Variance
    Overfitting - Low Bias & High Variance

  • @RinkiSingh-ph6oo
    @RinkiSingh-ph6oo 3 ปีที่แล้ว

    well-done sir ....keep it up

  • @ameysawant2301
    @ameysawant2301 4 ปีที่แล้ว

    You make one of the best tech videos on youtube !!!!

  • @shekharpandey9776
    @shekharpandey9776 4 ปีที่แล้ว +3

    Please give a video on some mathematical terminology like gradient descent etc. You are really doing a great job.

  • @avinashankar
    @avinashankar 3 ปีที่แล้ว

    Thanks Krish, had scourged the net, but this understanding was great. Good memory hook! Thanks for this.

  • @lekshmigs123
    @lekshmigs123 2 ปีที่แล้ว

    Thank you very much for the simple and proper explanation...

  • @subhajitsaha345
    @subhajitsaha345 3 ปีที่แล้ว +1

    Nice explanation..............

  • @arundhathig7841
    @arundhathig7841 หลายเดือนก่อน

    very good understanding vedio sir

  • @robertselemani3775
    @robertselemani3775 2 ปีที่แล้ว

    Well articulated, thank you Krish

  • @donkeshwarkavyasree8632
    @donkeshwarkavyasree8632 3 ปีที่แล้ว

    The best explanation among the whole youtube channels 👏. I love the way how you always keep things simple. Glad to find out about your channel, sir.

  • @alihamdan425
    @alihamdan425 3 ปีที่แล้ว

    GREAT SIR I GOT IT, THANKS FOR YOUR EFFORT.

  • @anirudhsrivastava3530
    @anirudhsrivastava3530 2 ปีที่แล้ว

    very niceee, filled the gap in my knowledge

  • @MANISHKUMAR-c2d3c
    @MANISHKUMAR-c2d3c ปีที่แล้ว +1

    for underfitting the condition will be high bias and low variance which is mentioned as high bias and high variance in this video

  • @sharawyabdul6222
    @sharawyabdul6222 3 ปีที่แล้ว

    Very well explained. Thanks

  • @bishwajeetsingh8834
    @bishwajeetsingh8834 2 ปีที่แล้ว

    My god Krish. This was the most confusing thing for me. And you cleared it so well.

  • @VigneshVicky-cn8ek
    @VigneshVicky-cn8ek 3 ปีที่แล้ว

    You nailed it man ! Great work ! Respect your time and effort!

  • @RAHULPANCHALMUSIC
    @RAHULPANCHALMUSIC 2 ปีที่แล้ว

    Sir superb explanation 🙏🙏

  • @saydainsheikh3123
    @saydainsheikh3123 3 ปีที่แล้ว

    brilliant video!!!!! explained everything to the point.

  • @shreyasb.s3819
    @shreyasb.s3819 4 ปีที่แล้ว

    Superbbb explained..it connected my dots. Thank u

  • @aziausa
    @aziausa 3 ปีที่แล้ว +4

    You have God-gifted talent to teach. You are a gem!!!!

    • @dudefromsa
      @dudefromsa 3 ปีที่แล้ว

      I agree with your sentiment. He has such understanding to break down concept in a coprehensive manner

  • @vladimirkirichenko1972
    @vladimirkirichenko1972 2 ปีที่แล้ว

    Insanely good video. Also this has amazing energy!

  • @nazhimkalam6842
    @nazhimkalam6842 4 ปีที่แล้ว

    best explanation on youtube

  • @nandinisarker6123
    @nandinisarker6123 4 ปีที่แล้ว

    I really was in great need of such an excellent explanation of Bias and variance. great help!

  • @subhenduswain4355
    @subhenduswain4355 3 ปีที่แล้ว

    Very nicely explained. 👍

  • @yashkhilavdiya5693
    @yashkhilavdiya5693 2 ปีที่แล้ว

    Thank You so much Krish Sir..!!

  • @sidduhedaginal
    @sidduhedaginal 4 ปีที่แล้ว +1

    This guy is really great...Thank you so much for effort you put for us.

  • @karm1311
    @karm1311 2 ปีที่แล้ว

    awesome explanation sir

  • @devasheeshvaid9057
    @devasheeshvaid9057 4 ปีที่แล้ว +4

    Hi @Krish
    I read the following in a resource:
    "Bias refers to the gap between the value predicted by your model and the
    actual value of the data. In the case of high bias, your predictions are likely
    to be skewed in a particular direction away from the actual values.
    Variance
    describes how scattered your predicted values are in relation to each other."
    This doesn't imply bias as the training data error and variance as the test data error. Am I missing any point here? Please elaborate.

    • @sandygaddam
      @sandygaddam 4 ปีที่แล้ว +1

      Hi Devasheeesh,
      Variance occurs when the model performs good on the trained dataset but does not do well on a dataset that it is not trained on, like a test dataset or validation dataset. Variance tells us how scattered are the predicted value from the actual value. For easier understanding of the concept, we can take it as test or validation data error.
      Bias is how far are the predicted values from the actual values. If the average predicted values are far off from the actual values then the bias is high.

  • @brahimferjani3147
    @brahimferjani3147 4 ปีที่แล้ว

    Good pedagogy and easy explanation. Thanks a lot

  • @alexsepenu
    @alexsepenu 3 ปีที่แล้ว

    you made my work easy by this explanation. thanks.

  • @SAN-te3rp
    @SAN-te3rp 3 ปีที่แล้ว

    I can tell you when it comes to maths explaination no Indian youtuber can match Krish and he is also giving full course at ineuron for ml dl with affordable cost

  • @manishsharma2211
    @manishsharma2211 4 ปีที่แล้ว +3

    Very good. Revised my concepts perfectly 🔥🔥

  • @leo.y.comprendo
    @leo.y.comprendo 3 ปีที่แล้ว

    Great video and great teacher!

  • @payalrastogi3950
    @payalrastogi3950 ปีที่แล้ว

    this video is really good ☺

  • @basavarajag1901
    @basavarajag1901 2 ปีที่แล้ว

    Excellent Explanation.. Krish , in the same video you example of XG boost i.e it model learns from the previous DT and implement the same subsequently.

  • @benyaminem.9385
    @benyaminem.9385 ปีที่แล้ว

    Thank you so much bro ! So clear !!!

  • @vishnukv6537
    @vishnukv6537 3 ปีที่แล้ว

    you have a data science related doubt ? Krish got the solution :)...............so good video sir

  • @mariorozario7649
    @mariorozario7649 2 ปีที่แล้ว

    Thank you so much for clearly explaining this. I have tried so hard to get PhD's to explain this to me .. and never got a clear answer.

  • @bonysrivastava7779
    @bonysrivastava7779 3 ปีที่แล้ว

    such a great teacher you're

  • @Satheeshkumar-hl6dv
    @Satheeshkumar-hl6dv 20 วันที่ผ่านมา

    Superb lecture sir