topskill.dev
CoursesTracks
All courses/Machine Learning FundamentalsGeneralization and overfitting
Fitting and reliable evaluation
1 / 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

Generalization and overfitting

Generalization means performing usefully on new examples from the setting we care about. A model can do well on training records yet fail to generalize.

Underfitting occurs when the model or training procedure misses important patterns, so even training predictions are poor. A single constant time estimate may miss obvious differences between short and long journeys.

Overfitting occurs when a model follows training-specific details, including noise, that do not carry over. A very elaborate rule could explain every recorded delay but predict tomorrow's trips badly.

The chart is a schematic, not an experiment. Its message is the gap between improving fit to known examples and worsening results on separate validation examples. More complexity is useful only while it improves the behavior we need.

Limiting tree depth, reducing model size, or penalizing extreme weights can help. Regularization is the general idea of discouraging overly flexible or extreme fitted solutions. Its strength is a choice to evaluate, not a guarantee. Better, more representative data may help too, but collecting more copies of the same narrow cases does not solve every problem.

Check your understanding

If training error falls while validation error rises, should you automatically keep the more complex model?

Answer: No. The pattern suggests overfitting; the improvement is limited to the training examples.

Fact 1
1 / 1
FACT 1

No. The pattern suggests overfitting; the improvement is limited to the training examples.