Start from the decision, not the metric
Machine learning dissertations are often judged on a single number, and examiners are wary of it. A metric is a summary of how a model's predictions compare with reality, and every summary hides something. The right metric is the one that reflects what the predictions will be used for: who acts on them, what a false alarm costs and what a missed case costs.
Two distinctions help. First, a loss function is what the algorithm minimises during training (for example, cross-entropy or squared error), while an evaluation metric is what you report to judge the trained model. They need not be the same. Second, metrics measure different properties: discrimination (does the model rank or separate cases correctly?), calibration (are its predicted probabilities right?) and error size (how far off are numerical predictions?). A complete evaluation usually needs more than one of these (Huang et al., 2021; Van Calster et al., 2019).

Metrics for regression and forecasting
Mean absolute error (MAE) is the average size of the errors, in the units of the outcome. It treats all errors in proportion and is less influenced by a few large errors than squared measures. It is differentiable everywhere except at zero error, which matters for training but not for reporting.
Mean squared error (MSE) squares each error before averaging, so large errors weigh heavily. Root mean squared error (RMSE) is its square root. RMSE returns the error to the original units, which makes it easier to interpret, but it ranks models exactly as MSE does and is just as sensitive to large errors.
Worked example (illustrative). Model A makes errors of 1, 1, 1, 1 and 10 units; model B makes five errors of 2.8. Both have an MAE of 2.8. Model A's RMSE is about 4.56, while model B's is 2.8. RMSE prefers B because it penalises the single large miss; MAE sees no difference. Which is right depends on whether one large error matters more than several small ones in your application.
R2 is the proportion of variance in the outcome explained by the model. On new data it can be negative, meaning the model does worse than predicting the mean. Adjusted R2 penalises extra predictors in linear regression but is not a substitute for evaluation on held-out data. In forecasting, error measures that depend on the scale of the data cannot be compared across series, and percentage errors break down near zero; scaled errors such as MASE avoid both problems (Hyndman & Athanasopoulos, 2021).
Metrics for classification
For a binary classifier, every prediction falls into one cell of the confusion matrix: true positive (TP), false positive (FP), false negative (FN) or true negative (TN). Most classification metrics are ratios of these cells, which is why the confusion matrix itself should always be reported.
| Metric | Formula or meaning | Use it when | Caution |
|---|---|---|---|
| Accuracy | (TP + TN) / all cases | Classes are balanced and errors cost the same | Misleading when positives are rare |
| Precision | TP / (TP + FP) | False alarms are costly | Depends on prevalence and threshold |
| Recall (sensitivity) | TP / (TP + FN) | Missed cases are costly | Can be raised by flagging everything |
| Specificity | TN / (TN + FP) | Correctly clearing negatives matters | Looks high whenever negatives dominate |
| F1 score | Harmonic mean of precision and recall | You need one number for the positive class | Ignores true negatives; weights P and R equally |
| Balanced accuracy | Mean of recall and specificity | Classes are imbalanced | Still threshold-dependent |
| ROC AUC | Probability a random positive is ranked above a random negative | Comparing ranking across thresholds | Ignores prevalence and calibration |
| PR AUC (average precision) | Area under the precision-recall curve | Positives are rare | Baseline equals prevalence, so compare with it |
| Brier score and calibration plot | Accuracy of predicted probabilities | Probabilities will be used for decisions | Needs enough events to estimate |
Precision and recall trade off against each other as the decision threshold moves. Low precision does not by itself mean poor hyperparameters: with rare positives, even a good model will raise many false alarms at a threshold that catches most cases. Choose and justify the threshold from the costs of each error, and report results at that threshold as well as across thresholds.
ROC curves can look reassuring when positives are rare, because the large number of true negatives keeps the false positive rate low. Precision-recall curves show the problem more clearly in such data (Saito & Rehmsmeier, 2015). If your model's probabilities will be used directly, for example as a risk score, report calibration too: a model can rank cases well and still give badly wrong probabilities (Van Calster et al., 2019). Benchmark studies in applied fields routinely report several metrics for this reason (Lessmann et al., 2015).
More than two classes
With several classes, precision, recall and F1 are computed per class and then averaged. A macro average gives each class equal weight, so rare classes count as much as common ones; a weighted average weights classes by their size and can hide poor performance on small classes; a micro average pools all decisions and, for single-label problems, equals accuracy. State which average you report and show per-class results in an appendix, since a good average can conceal a class the model never gets right.
Worked example: a rare outcome (illustrative)
A dissertation builds a model to flag fraudulent transactions. The test set has 10,000 transactions, of which 100 (1%) are fraudulent. The model flags 300 transactions and catches 80 of the frauds.
| Predicted fraud | Predicted genuine | |
|---|---|---|
| Actual fraud (100) | TP = 80 | FN = 20 |
| Actual genuine (9,900) | FP = 220 | TN = 9,680 |
- Accuracy is 0.976, yet a rule that calls every transaction genuine scores 0.990. Accuracy alone would favour the useless rule.
- Recall is 0.80 and precision is about 0.27: the model finds most frauds, but nearly three in four alerts are false. F1 is 0.40.
- Specificity is about 0.978 and balanced accuracy about 0.889.
The useful report here is recall and precision at the chosen threshold, the PR curve with its baseline of 0.01, and a sentence on what 220 false alerts would mean for the investigators who must check them.
A metric is only as good as the evaluation design
The same metric can be honest or badly inflated depending on how it was computed. Three problems recur in doctoral work. First, leakage: information from the test set reaches training through preprocessing, feature selection or duplicated records, a problem found across many fields (Kapoor & Narayanan, 2023). Second, tuning on the test set: if hyperparameters are chosen by the same cross-validation used to report performance, the estimate is optimistic, and nested cross-validation or a separate held-out set is needed (Varma & Simon, 2006). Third, ignoring time: for time-ordered data, random splits let the model learn from the future, so use forward-chaining or blocked designs (Bergmeir & Benítez, 2012). Security datasets add sampling bias and unrealistic base rates (Arp et al., 2022).
Report uncertainty as well as point estimates, for example with confidence intervals from bootstrapping or the spread across cross-validation folds, and compare against simple baselines such as the majority class or a linear model.
What to report
| Element | What to state |
|---|---|
| Purpose | The decision the model supports and the cost of each type of error |
| Data split | How training, validation and test sets were formed (random, grouped or by time) |
| Primary metric | Chosen before analysis, with the reason |
| Secondary metrics | Confusion matrix, precision and recall, PR or ROC curves, calibration, or MAE and RMSE as relevant |
| Threshold | How it was chosen, and results at that threshold |
| Uncertainty | Confidence intervals or variation across folds or seeds |
| Baselines | Simple comparators and earlier published models |
| Reproducibility | Code, seeds, versions and split files (Pineau et al., 2021) |
For clinical prediction models, follow TRIPOD+AI, which asks for discrimination, calibration and clinical usefulness to be reported (Collins et al., 2024). Other fields have their own guidelines; check what your target journal expects.
Common mistakes
- Reporting accuracy alone on imbalanced data.
- Claiming that RMSE is robust to outliers.
- Choosing the metric after seeing which one makes the model look best.
- Reporting ROC AUC without a precision-recall view when positives are rare.
- Treating predicted probabilities as risks without checking calibration.
- Tuning and testing on the same data, or splitting time series at random.
- Giving point estimates without uncertainty or a baseline.
For choosing the algorithm itself, see how to choose a machine learning algorithm for your research; for wider design pitfalls, methodology mistakes in machine learning PhDs; and for presenting results, reporting statistical results. A worked critique of a clinical model is in machine learning for early sepsis prediction.
Key takeaways
- Choose metrics from the decision the model supports and report more than one property (Huang et al., 2021).
- RMSE and MSE are equally sensitive to large errors; MAE is less so (Hyndman & Athanasopoulos, 2021).
- With rare positives, use precision-recall curves and report the confusion matrix (Saito & Rehmsmeier, 2015).
- Check calibration whenever probabilities will be used (Van Calster et al., 2019; Collins et al., 2024).
- Guard against leakage and optimistic tuning so that the metric means something (Kapoor & Narayanan, 2023; Varma & Simon, 2006).
