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

Baselines

A baseline is a simple comparison that tells us whether a more elaborate model adds value. For delivery duration, one baseline could always predict a typical duration from the training records. For classification, it could always choose the most common training category.

Suppose an invented evaluation set contains 90 on-time trips and 10 late trips. Always predicting on time gets 90 of 100 answers right, or 90% accuracy. It also misses every late trip. A high-looking percentage can hide failure on the very cases that motivated the project.

Use the same held-out examples and the same error measures for the baseline and the candidate. An existing operational rule is another useful baseline. The candidate should justify its extra maintenance, latency, or complexity.

Baselines do not have to be intentionally weak. A simple linear model can provide a serious comparison for a complicated network. If the network does not improve outcomes enough to matter, the smaller model may be the better choice.

Decide what improvement is useful before searching through models. Otherwise model comparisons can focus on small score changes that do not improve the intended decision.

Check your understanding

Why is the always-on-time classifier a poor late-trip warning system despite 90% accuracy?

Answer: It never warns about any of the 10 late trips. Overall correctness does not describe which mistakes it makes.

Fact 1
1 / 1
FACT 1

It never warns about any of the 10 late trips. Overall correctness does not describe which mistakes it makes.