Principle:Scikit learn Scikit learn Baseline Models
| Knowledge Sources | |
|---|---|
| Domains | Model Evaluation, Supervised Learning |
| Last Updated | 2026-02-08 15:00 GMT |
Overview
Baseline models provide simple, naive prediction strategies that serve as reference points against which the performance of more sophisticated models is measured.
Description
Baseline models (also called dummy estimators) implement prediction strategies that ignore the input features entirely, producing predictions based solely on simple statistics of the training targets. They solve the critical problem of establishing a performance floor: any useful model should outperform these naive strategies. Without a baseline, it is impossible to know whether a model's accuracy is meaningful or merely reflects trivial patterns such as class imbalance. Baseline models are an essential component of rigorous model evaluation methodology, providing the minimum acceptable standard of performance.
Usage
Use dummy classifiers to verify that a classification model performs better than trivial strategies. The "most frequent" strategy always predicts the majority class and establishes the accuracy baseline for imbalanced datasets. The "stratified" strategy generates random predictions proportional to class frequencies, establishing a baseline that respects class distribution. The "uniform" strategy predicts classes uniformly at random. Use dummy regressors similarly: the "mean" strategy always predicts the training set mean, and the "median" strategy predicts the median. Any model that fails to exceed the baseline performance may be learning noise rather than signal.
Theoretical Basis
Dummy Classifier Strategies:
Most Frequent: Always predicts the most frequent class in the training set:
Expected accuracy on the training set: , where is the count of class .
Stratified: Generates predictions by sampling from the training class distribution:
Expected accuracy: .
Uniform: Generates predictions uniformly at random:
Expected accuracy: .
Constant: Always predicts a user-specified constant class.
Dummy Regressor Strategies:
Mean:
The mean predictor minimizes the MSE: . A model with outperforms this baseline.
Median:
The median predictor minimizes the MAE and is more robust to outliers.
Quantile: Predicts a specified quantile of the training target distribution.
Constant: Always predicts a user-specified constant value.
Interpretation: A model's score directly measures improvement over the mean baseline: