Home / Insights / AI and Machine Learning
AI and Machine Learning
Baselines and Success Metrics for Machine Learning Projects: Decide Them Before You Train
Most disappointing machine learning projects were not defeated by the model. They started without a clear baseline or a metric tied to a business decision, so nobody could say whether the model was good enough. This guide shows how to set both before any training begins.
Key takeaways
- A model is only “good” relative to something. Record the current process and a trivial baseline before training anything.
- Choose one primary metric that reflects the cost of errors in your workflow, plus a few guardrail metrics.
- Accuracy is misleading when the interesting outcome is rare. Use precision, recall or cost-weighted measures instead.
- Evaluate on data that looks like production, split by time where the future is what you are predicting.
- Translate the metric into a business threshold before training, so the go or no-go decision is not made after seeing results.
On this page
A common pattern in machine learning work: the team trains a model, reports a respectable-looking score, and the business sponsor asks the obvious question, “Is that good?” Nobody can answer, because nobody recorded how the current process performs, which errors matter most, or what improvement would justify changing the workflow. The project then drifts between more tuning and a vague pilot.
Our machine learning development work starts with a data review and a baseline for exactly this reason. This article explains how to set up that baseline and choose a success metric, using classification and forecasting examples. If you are still deciding whether machine learning is the right approach at all, read AI, machine learning, deep learning and generative AI first.
Three baselines worth recording
A baseline answers “compared with what?” There are usually three worth recording, and they serve different purposes.
| Baseline | What it is | Why it matters |
|---|---|---|
| Trivial baseline | A rule that ignores the inputs: always predict the most common class, last week’s value, or the average | Shows whether the model is learning anything at all |
| Current process | How the task is done today: human judgement, spreadsheet rules, a vendor tool | The real comparison for the business case |
| Simple model | A straightforward model such as logistic regression or a small gradient-boosted tree with obvious features | Shows how much a more complex approach actually adds |
The trivial baseline is cheap and surprisingly informative. Libraries make it easy: scikit-learn’s DummyClassifier, for instance, predicts using only the label distribution and ignores the features, so a model that cannot beat it is not learning anything useful. In forecasting, “same as last week” or “same week last year” plays the same role.
The current-process baseline is harder, because it often has never been measured. If planners forecast demand in a spreadsheet, you need their historical forecasts alongside actuals. If agents categorise support tickets by hand, you need a sample re-checked by a second person to see how consistent they are. Google’s Rules of Machine Learning makes a related point: design and implement metrics first, tracking as much as you can in the current system before building the ML system, so you have historical baselines.
Choosing a primary metric that reflects the cost of errors
Every model makes two kinds of mistakes, and they rarely cost the same. The metric should reflect which mistake hurts more in your workflow.
Classification
- Precision: of the items the model flags, how many are correct. Prioritise it when false alarms are expensive, such as when every flagged transaction triggers a manual investigation or blocks a customer.
- Recall: of all the real positives, how many the model finds. Prioritise it when missing a case is expensive, such as a safety defect or a high-value churn risk.
- F1 or a cost-weighted score: when neither error clearly dominates, or when you can put rough costs on each.
Most classifiers output a score, and the threshold you choose trades precision against recall: raising it usually reduces false positives and increases false negatives. That threshold is a business decision, not a modelling detail.
Forecasting and regression
- Mean absolute error is easy to explain (“on average we are off by this many units”).
- Percentage errors are intuitive but behave badly when actual values are near zero, which is common for slow-moving products.
- Bias (consistently over or under) often matters more operationally than average error, because systematic over-forecasting builds stock.
Guardrail metrics
Alongside the primary metric, track two or three guardrails: performance on important segments (new customers, small stores, a minority class), latency, and the share of cases routed to human review.
The accuracy trap with rare outcomes
Accuracy counts every correct prediction equally, so when the interesting class is rare, the majority class dominates. As an illustrative example, if only a small fraction of transactions are fraudulent, a model that labels everything “legitimate” achieves very high accuracy while catching nothing. The trivial baseline exposes this immediately, which is another reason to compute it.
For rare-event problems, report the confusion matrix (true and false positives and negatives) at the threshold you intend to use, and express it in operational terms: “at this threshold, the review team would see roughly this many alerts per day, and we would expect to catch this share of known cases.”
Evaluating on data that resembles production
A metric is only meaningful if the test data resembles what the model will see live. Common mistakes:
- Random splits on time-dependent data. If you are predicting the future, test on a later period than you train on. Standard k-fold cross-validation can train on future data and evaluate on the past, which inflates scores. Time-aware splitters such as scikit-learn’s
TimeSeriesSplitkeep the test fold after the training data. - Leakage through features. A feature that is only known after the outcome (for example “refund issued” when predicting complaints) makes the model look excellent in testing and useless in production.
- Duplicate or related records across splits. The same customer or product appearing in both training and test sets overstates performance on genuinely new cases.
- Training-serving differences. If features are computed differently in the live system, results will drift from the evaluation. Logging features at serving time and reusing the same code for training and serving reduces this risk.
For more on keeping evaluation honest after launch, see our guide to MLOps and LLMOps.
Setting a go or no-go threshold in advance
Before training, write down a short statement the sponsor signs off:
- The decision the model supports and who acts on it.
- The primary metric and how it is computed.
- The baselines and their measured values.
- The improvement over the current process that would justify a pilot.
- The guardrail limits that must not be breached.
- The test data period and how it was held out.
An illustrative example: “The model will rank open invoices by likelihood of late payment for the collections team. Primary metric: share of eventually late invoices found in the top-ranked portion of the list each week. Baseline: current practice of sorting by amount. A pilot proceeds if the model finds meaningfully more late invoices than the baseline on the most recent three months held out, with no worse performance for small customers.”
This removes the temptation to redefine success after seeing results, and it gives the project a clean stopping point if the data cannot support the task.
Frequently asked questions
What if we have no record of how the current process performs?
Measure a sample now. Ask staff to log decisions for a few weeks, or reconstruct past decisions from system records. Even an approximate current-process baseline is better than none.
Can we change the metric during the project?
You can, if you learn the original metric did not reflect the real cost of errors. Record the change and the reason, and re-evaluate all baselines on the new metric so comparisons stay fair.
How much better than the baseline does a model need to be?
There is no universal figure. It depends on the cost of the current process, the cost of errors and the cost of running the model. Agree the threshold with the business sponsor before training.
Should we report a single number to stakeholders?
Report one primary metric for the decision, but always with the baseline next to it and the guardrail metrics alongside. A single number without context invites misinterpretation.
Sources and methodology
Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.
- scikit-learn: DummyClassifier documentation — Supports the description of trivial baselines that ignore input features.
- Google for Developers: Rules of Machine Learning — Supports measuring the current system before building ML, and logging serving features to reduce training-serving skew.
- Google Machine Learning Crash Course: Precision and recall — Supports the definitions of precision and recall, the threshold trade-off and the weakness of accuracy on imbalanced data.
- scikit-learn: TimeSeriesSplit documentation — Supports the point that standard k-fold can train on future data, and time-ordered splits avoid this.
Related reading
Continue your research
Do you know what your ML model has to beat?
We start machine learning projects with a data review and a measured baseline, so you can see early whether a model is worth building and what success looks like.
