topskill.dev
CoursesTracks
All courses/Machine Learning FundamentalsBias and variance intuition
Fitting and reliable evaluation
5 / 7
← Machine Learning Fundamentals
○What machine learning learns○Features and labels○Training and inference○Regression or classification○The machine learning process○Data quality and coverage○Representing data✦Module Quiz
○Linear regression○Try a tiny linear model○Logistic regression○Nearest neighbors○Decision trees○Random forests○Boosting○Naive Bayes○Support vector machines✦Module Quiz
○Clustering○K-means○Choosing and interpreting clusters○Principal component analysis○Neural networks and deep learning○Self-supervised learning○Transfer learning○Reinforcement learning✦Module Quiz
○Generalization and overfitting○Holding out evaluation data○Data leakage○Baselines●Bias and variance intuition○Reading learning curves✦Module Quiz
○Prediction errors and residuals○Measuring regression error○Squared error and large misses○The confusion matrix○Precision and recall○Try a held-out classifier✦Module Quiz
○Bias and limits○Monitoring and drift○Comparing models for a decision✦Module Quiz
Fitting and reliable evaluation

Bias and variance intuition

Imagine fitting the same modeling procedure to several different training samples from the same setting. For one fixed input, the predictions may be consistently wrong, highly variable, or both. This thought experiment helps distinguish bias from variance.

Bias concerns systematic mismatch: the average prediction across those possible training samples differs from the underlying average target for that input. A constant model can miss a genuine relationship between distance and duration even with many examples.

Variance concerns sensitivity: fitting on a different sample changes the prediction substantially. A very flexible model may follow unusual details of whichever sample it received.

Each mark in this schematic is a prediction from a separate fitted model, not a different input. The reference line is an assumed underlying average for explaining the idea. In real data that average is usually unknown, so one test set does not directly reveal a model's exact bias and variance.

Restricting flexibility can reduce variance but increase bias. Increasing flexibility can reduce some systematic mismatch while making predictions less stable. These are useful tendencies, not a guarantee that every algorithm follows a simple U-shaped error curve.

Some uncertainty remains even with a good model because the features do not determine the outcome exactly. Measurement noise or unobserved conditions can limit predictable accuracy. This statistical use of bias is distinct from sampling bias or unfair treatment, discussed later.

Check your understanding

What does it suggest when predictions change greatly across comparable training samples?

Answer: High variance: the fitted result is sensitive to which training examples were used.

Fact 1
1 / 1
FACT 1

High variance: the fitted result is sensitive to which training examples were used.