topskill.dev
CoursesTracks
All courses/Machine Learning FundamentalsHolding out evaluation data
Fitting and reliable evaluation
2 / 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

Holding out evaluation data

Separate examples let us estimate how a model behaves beyond its training records. A common design uses training, validation, and test sets.

The training set fits the model. The validation set helps choose an approach and settings, such as tree depth or the number of neighbors. These chosen settings are called hyperparameters. The test set supports a final check after those choices are fixed.

Repeatedly checking the test score and changing the model makes the test set part of model selection. Its score can then look better than performance on genuinely new cases. A test set is useful because it has been kept out of those decisions, not because its filename says "test."

The split should reflect the intended use. For tomorrow's deliveries, train on earlier trips and evaluate on later trips. If repeated records concern the same rider, keep a rider's related records together when the goal is to generalize to unseen riders. A random row split can otherwise make evaluation too easy.

Cross-validation repeats training and validation across several partitions to make comparisons less dependent on one split. It must still respect time or group boundaries, and it does not turn the final test set into tuning data.

Dataset size and the intended use determine appropriate split proportions; there is no universally correct percentage. A small test set produces an unstable estimate, especially for rare classes. Report its size and relevant class counts along with the score.

Check your understanding

Which set should guide a choice between a shallow and a deep tree?

Answer: The validation set, or suitable cross-validation on the development data. Keep the final test set out of that choice.

Fact 1
1 / 1
FACT 1

The validation set, or suitable cross-validation on the development data. Keep the final test set out of that choice.