Evaluation metrics are the measures used to judge the quality of a statistical or machine learning model, such as accuracy, precision, recall, F-score, AUC and log loss. Each metric turns a model's predictions into a number you can compare across models and over time. The right metric depends on the decision the model supports.
This page is for data teams and business leaders who need to choose and read model metrics. It covers what the common metrics measure, how classification and regression differ, and how to pick a metric that fits the goal.
What are evaluation metrics?
A metric compares a model's predictions with known outcomes and returns a score. The scikit-learn model evaluation guide describes three ways to evaluate prediction quality: the estimator's own score method, a scoring parameter used by cross-validation and search tools, and metric functions in a dedicated metrics module. By default, the score method gives accuracy for classifiers and the coefficient of determination (R squared) for regressors.
Why do evaluation metrics matter?
A model that cannot be measured cannot be trusted or improved. Metrics let teams compare candidates, set release thresholds and spot degradation after deployment. A poorly chosen metric can hide a failing model.
What do the common metrics measure?
The Google Machine Learning Crash Course defines accuracy as the proportion of all classifications that were correct, precision as the proportion of the model's positive classifications that are actually positive, and recall as the proportion of all actual positives that were classified correctly. It warns that accuracy can mislead on imbalanced data: a model that always predicts the majority class can look strong while being useless.
| Metric | Question it answers | Watch out for |
|---|
| Accuracy | How often is the model right overall? | Misleading when one class is rare |
| Precision | When it predicts positive, how often is it correct? | Ignores positives the model missed |
| Recall | Of all real positives, how many did it find? | Ignores false alarms |
| F-score | How do precision and recall balance? | Hides which of the two is weak |
| AUC and ROC | How well does it rank positives above negatives across thresholds? | Not tied to one decision threshold |
| Log loss | How good are its predicted probabilities? | Penalises confident wrong answers heavily |
The same source notes that precision and recall often move in opposite directions: raising the classification threshold usually cuts false positives and adds false negatives, and lowering it does the reverse.
How do you choose the right metric?
The scikit-learn guide advises that if a scoring function is given, for example in a business context, you should use that one, and that if you are free to choose, you should start from the ultimate goal and application of the prediction. It also recommends using the same strictly consistent scoring function as the training loss and as the evaluation metric where possible.
How do evaluation metrics differ from loss functions?
| Term | Purpose | Used when |
|---|
| Loss function | Guides the model's learning by penalising errors | During training |
| Evaluation metric | Reports quality in terms people can act on | After training, in comparison and monitoring |
How do evaluation metrics relate to AI agents?
An AI agent combines a model with tools and actions, so a single accuracy figure rarely covers it. Teams track model metrics beside task outcomes, such as whether an action was correct and within policy. Platforms such as ElixirClaw, XenonStack's AI agents computing platform, sit in this wider picture where model scores are one input among several.
What should you do first?
- Write down the decision the model supports and the cost of each kind of error.
- Pick one primary metric that reflects that cost, and one or two supporting metrics.
- Check class balance before trusting accuracy.
- Evaluate on held-out data, not on training data.
- Track the same metrics after release and set a threshold that triggers review.
To map one decision your agents make, and the data and policy it depends on, book a Context Workshop. See what happens in the workshop.
Frequently asked questions
What are the most common evaluation metrics?
For classification, accuracy, precision, recall, F-score, AUC and log loss are common. For regression, mean squared error, mean absolute error and R squared are common.
Why is accuracy not always a good metric?
On imbalanced data, a model that always predicts the majority class can score highly on accuracy while being useless. Precision, recall or F-score give a clearer picture.
What is the difference between precision and recall?
Precision is the share of positive predictions that are correct. Recall is the share of actual positives that the model finds. Improving one often worsens the other.
What does AUC measure?
AUC is the area under the ROC curve. It summarises how well a model ranks positive cases above negative ones across all classification thresholds.
Should I use the same metric for training and evaluation?
Where possible, yes. The scikit-learn guide recommends using a strictly consistent scoring function both as the loss for training and as the metric for evaluation and comparison.