Baseline

noun

say it: “BAYS-lyn” /ˈbeɪslaɪn/

In machine learning, a very simple guess, such as always predicting the average, whose score a real model has to beat.

What is a baseline in machine learning?

A baseline is the simplest honest guess, such as always guessing the average or the most common answer. A model is only worth using if it beats its baseline on the same test data; scikit-learn's DummyRegressor and DummyClassifier make one.

from sklearn.metrics import mean_absolute_error
loaves = [40, 52, 61, 47]
average = sum(loaves) / len(loaves)                     # 50.0
print(mean_absolute_error(loaves, [average] * 4))   # 6.5: the score to beat

In a sentence

  • “The new model beat the baseline by only half a loaf, so it wasn't worth the trouble.”
  • “Always guessing 50 loaves was the baseline, off by 6.5 loaves a day.”

Level: Apprentice · More AI Basics terms at this level

Updated

In other subjects