Understanding Bias and Variance in Estimators

where does the error come from n.w
1 / 22
Embed
Share

Explore the concepts of bias and variance in estimators through examples and visuals. Learn how varying sample sizes and model complexity can impact the performance of estimators. Discover the significance of unbiased estimators and the implications on mean and variance estimation.

  • Bias
  • Variance
  • Estimators
  • Machine Learning
  • Statistics

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Where does the error come from?

  2. Review Average Error on Testing Data error due to "bias" and error due to "variance" A more complex model does not always lead to better performance on testing data.

  3. Estimator ? Bias + Variance ? = ? Only Niantic knows ? From training data, we find ? ? ? is an estimator of ?

  4. Bias and Variance of Estimator unbiased Estimate the mean of a variable x assume the mean of x is ? assume the variance of x is ?2 Estimator of mean ? Sample N points: ?1,?2, ,?? ?2 ?5 ?1 ? ? =1 ?? ? ? ?4 ? ?3 1 ? ??=1 ? ??= ? ? ? = ? ? ?6 ? ?

  5. Bias and Variance of Estimator unbiased Estimate the mean of a variable x assume the mean of x is ? assume the variance of x is ?2 Estimator of mean ? Sample N points: ?1,?2, ,?? Smaller N Larger N ? =1 ?? ? ? ? ? ? Variance depends on the number of samples V?? ? =?2 ?

  6. Bias and Variance of Estimator Increase N Estimate the mean of a variable x assume the mean of x is ? assume the variance of x is ?2 Estimator of variance ?2 Sample N points: ?1,?2, ,?? ?3 ?2 ?1 ?2 ? =1 ? =1 ?? ?? ?2 ? ? ?4 ?5 ? ? Biased estimator ?2 ?6 ? ? =? 1 ?2 ?2 ?

  7. ? ?= ? ? Variance Bias ?

  8. Parallel Universes In all the universes, we are collecting (catching) 10 Pok mons as training data to find ? Universe 1 Universe 2 Universe 3

  9. Parallel Universes In different universes, we use the same model, but obtain different ? Universe 345 Universe 123 y = b + w xcp y = b + w xcp

  10. ? in 100 Universes y = b + w xcp y = b + w1 xcp + w2 (xcp)2 + w3 (xcp)3 y = b + w1 xcp + w2 (xcp)2 + w3 (xcp)3 + w4 (xcp)4 + w5 (xcp)5

  11. y = b + w1 xcp + w2 (xcp)2 + w3 (xcp)3 + w4 (xcp)4 + w5 (xcp)5 Variance y = b + w xcp Large Variance Small Variance Simpler model is less influenced by the sampled data Consider the extreme case f(x) = 5

  12. Bias ? ? = ? Bias: If we average all the ? , is it close to ? ? Large Bias Assume this is ? Small Bias

  13. Black curve: the true function ? Red curves: 5000 ? Blue curve: the average of 5000 ? = ?

  14. Bias y = b + w1 xcp + w2 (xcp)2 + w3 (xcp)3 + w4 (xcp)4 + w5 (xcp)5 y = b + w xcp Small Bias Large Bias model model

  15. Bias v.s. Variance Error from bias Error from variance Error observed Underfitting Overfitting Small Bias Large Bias Large Variance Small Variance

  16. What to do with large bias? Diagnosis: If your model cannot even fit the training examples, then you have large bias If you can fit the training data, but large error on testing data, then you probably have large variance For bias, redesign your model: Add more features as input A more complex model Underfitting Overfitting large bias

  17. What to do with large variance? More data Very effective, but not always practical 10 examples May increase bias 100 examples Regularization

  18. Model Selection There is usually a trade-off between bias and variance. Select a model that balances two kinds of error to minimize total error What you should NOT do: Real Testing Set Training Set Testing Set Model 1 Err = 0.9 (not in hand) Model 2 Err = 0.7 Model 3 Err > 0.5 Err = 0.5

  19. Homework public private Training Set Testing Set Testing Set Model 1 Err = 0.9 Model 2 Err = 0.7 Model 3 Err = 0.5 I beat baseline! Err > 0.5 No, you don t What will happen? http://www.chioka.in/how- to-select-your-final-models- in-a-kaggle-competitio/

  20. Cross Validation public private Testing Set Training Set Testing Set Training Set Using the results of public testing data to tune your model You are making public set better than private set. Validation set Model 1 Err = 0.9 Not recommend Model 2 Err = 0.7 Err > 0.5 Model 3 Err = 0.5 Err > 0.5

  21. N-fold Cross Validation Training Set Model 2 Model 3 Model 1 Train Train Val Err = 0.2 Err = 0.4 Err = 0.4 Train Val Train Err = 0.4 Err = 0.5 Err = 0.5 Val Train Train Err = 0.3 Err = 0.6 Err = 0.3 Avg Err = 0.3 Avg Err = 0.5 Avg Err = 0.4 Testing Set Testing Set public private

  22. Reference Bishop: Chapter 3.2

More Related Content