liveBook · Manning

Constant baseline

As explained in Machine Learning System Design

A constant baseline is a baseline model that produces a fixed or stepwise fixed output rather than learning a complex mapping from inputs to predictions.

Before investing in a sophisticated prediction model, ask what the simplest possible answer would achieve. A constant baseline replaces learned relationships with a fixed prediction. It gives a selected metric a starting value and tests whether a more complex model earns its development and operating cost. section 8.2 section 8.2.1 section 8.5

Choose a primitive prediction that fits the task:

  • For regression, predict an average, median, last available value, or chosen constant. section 8.2
  • For classification, predict the majority class or a fixed probability for the positive class. section 8.2
  • For ranking, start with an equally simple reference, such as random order or a basic heuristic; it need not be a literal constant. section 8.2

A taxi arrival estimate

Suppose an arrival-time service must avoid both discouraging customers with overestimates and disappointing them with underestimates. “Always predict five minutes” is a constant baseline. Returning a fixed estimate for each district is a step toward a rule-based baseline. In this case, such simple estimates were hard to beat, and a district-based rule served as a production fallback. section 8.3

Keep the baseline after moving on: it is a sanity check for new models and a fallback when prediction fails, exceeds a response-time limit, or lacks history for a new user or item. Compare each proposed upgrade against it on metric improvement, implementation effort, interpretability, and computation time. A stepwise-constant prediction even won a factory time-series competition, so do not assume complexity will win. section 8.2.1 section 8.5

How Machine Learning System Design covers it

How deep it goes
Defines a constant approximation and gives task-specific choices and operational reasons, without deriving an algorithm.
Examples
Uses fixed taxi arrival estimates, district-based estimates, and a stepwise-constant factory time-series competition winner.
What it assumes
Assumes a defined prediction task and selected metric, but starts without a trained model.
What you can do after
Build it from scratch to benchmark a selected metric, assess upgrades, and provide a prediction fallback.
How it connects
Connects to regression, classification, ranking, rule-based baselines, linear models, and cold start.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.