Machine Learning Best Practices

Chapter 1 · Practice 2 of 4

Check whether a heuristic already solves the problem

From Problem framing and baselines

Why it matters

Rule #1 of Google's Rules of ML is not to be afraid to launch a product without machine learning. A rule such as "flag transactions over a set amount from a new device" can be shipped quickly, explained to anyone and measured.

A heuristic is also valuable later:

Use of the heuristicWhy
The baseline to beatShows how much the model adds
A feature for the modelRule #7 suggests turning heuristics into features
A fallbackSomething sensible when the model is unavailable

Rule #3 says to choose machine learning over a complex heuristic: when rules pile up and become hard to maintain, a model is often simpler to own.