What are model evaluation metrics?
Model evaluation metrics are numbers that score how well a model's predictions match the true answers on data it was not trained on. For classification, most of them come from the confusion matrix: accuracy, precision, recall, F1, and the ROC curve with its area (AUC). For regression, the usual ones are mean squared error (MSE), mean absolute error (MAE), and R².
The metric decides which model gets shipped. Fraud detection, medical screening, and spam filtering have rare positives and unequal error costs, so accuracy alone hides the failures that matter. Ranking and recommendation care about ordering, which AUC measures. Forecasting teams choose between MSE and MAE depending on whether a few large misses are worse than many small ones. The same metrics also set decision thresholds, compare candidate models, and trigger early stopping during training.
Key ideas
- Accuracy is misleading on imbalanced data; always compare against the majority-class baseline.
- The confusion matrix (TP, FP, TN, FN) is the source of every classification metric.
- Precision asks how many flagged cases are real; recall asks how many real cases were flagged.
- Moving the decision threshold trades precision against recall, and F1 summarizes the balance.
- ROC AUC is the probability that a random positive outranks a random negative.
- MSE punishes large errors more than MAE, and R² compares the model against predicting the mean.
Short takes on this topic
Common questions
When should I use PR AUC instead of ROC AUC?
Use the precision-recall curve when positives are rare and false alarms are what you care about, as in fraud or rare-disease detection. ROC AUC can stay high in those settings because the large pool of negatives keeps the false positive rate small. A random classifier has ROC AUC 0.5, but its PR AUC equals the positive rate, so PR AUC must be read against that baseline.
What is the difference between macro and micro averaging?
For multi-class problems, macro averaging computes a metric such as F1 for each class and then takes the plain mean, so rare classes count as much as common ones. Micro averaging pools all TP, FP, and FN counts first, so frequent classes dominate. In single-label multi-class classification, micro-averaged F1 equals accuracy.
What is a good AUC score?
There is no universal cutoff, because it depends on how hard the task is and what the alternatives score. 0.5 is chance and 1.0 is perfect ranking. Compare AUC against a simple baseline and against existing models on the same test set rather than against a fixed number.
Should I report RMSE or MSE?
RMSE is the square root of MSE, so it is in the same units as the target, which makes it easier to read. The two rank models identically. MSE is more common as a training loss because its gradient is simpler.
Related explainers
- Class Imbalance & Resampling — SMOTE, class weights, and metrics beyond accuracy
- Train, Validation & Test Sets — Splitting data to measure generalization and avoid overfitting
- Cross-Validation — K-fold, stratified, and leave-one-out evaluation
- Classification vs Regression — Two kinds of prediction and when to use each
- Loss Functions — How networks measure their mistakes
- Overfitting & Underfitting — The bias-variance tradeoff and generalization
References
- Fawcett (2006), "An introduction to ROC analysis", Pattern Recognition Letters
- Davis & Goadrich (2006), "The Relationship Between Precision-Recall and ROC Curves", ICML
- Saito & Rehmsmeier (2015), "The Precision-Recall Plot Is More Informative than the ROC Plot When Evaluating Binary Classifiers on Imbalanced Datasets", PLoS ONE
- James, Witten, Hastie & Tibshirani, "An Introduction to Statistical Learning"
Last updated