liveBook · Manning

Rule-based baseline

As explained in Machine Learning System Design

A rule-based baseline is a baseline model that produces predictions through explicit conditional rules or category-specific statistics rather than learned general-purpose parameters.

A rule-based baseline produces predictions from explicit conditions or category-specific statistics instead of learned general-purpose parameters. It is a practical step between a constant baseline and a linear model. section 8.3

Common forms include:

  • Return a fixed value when a condition matches, such as “if district == X: return Y.” section 8.3
  • Return the mean, median, or mode for one category or a combination of categories. section 8.3
  • Use regular expressions as an initial rule-based approach for natural language processing problems. section 8.3

Taxi arrival-time prediction

For a taxi aggregator, predicting five minutes for every request or four minutes for Manhattan created simple comparison points. A location-based median could provide a more specific rule, and the rule-based fallback was difficult to beat with more sophisticated machine learning. section 8.3

Figure 8.3 A typical sequence of baselines at the early stage of designing your model
figure

Use the baseline sequence to place rule-based models between constant baselines and linear models before considering more specialized approaches. section 8.3

How Machine Learning System Design covers it

How deep it goes
Explains conditional and category-statistic construction, then stops short of detailed algorithmic internals.
Examples
Uses taxi arrival-time rules, location medians, fixed predictions, and regular expressions as concrete examples.
What you can do after
Evaluate whether added model complexity justifies its accuracy, effort, interpretability, and computation-time costs.
How it connects
Connects constant baselines, linear models, feature baselines, recommender systems, and natural language processing.

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.