Classification metrics

Edge AI Lab

tags
edge-ai-lab

The following metrics apply to binary classification, multi-class classification, or both:

Metric Description Use case
Accuracy The fraction of correct predictions out of all predictions. For example, 73 out of 100 correct predictions gives an accuracy of 0.73. Higher is better. Does not account for class imbalance. When classes have similar sample sizes.
AUC Area Under the ROC Curve. Measures how well a binary classifier separates classes. Ranges from 0 to 1, where 1.0 is perfect and 0.5 is no better than random. When you need an overall measure of binary classification quality.
Balanced Accuracy The average accuracy across all classes. Compensates for class imbalance by weighting each class equally. When classes are imbalanced.
F1 Score The harmonic mean of Precision and Recall. Ranges from 0 (worst) to 1 (best). When you need a balance between Precision and Recall, especially with imbalanced data.
F1 (macro) Computes the F1 score independently for each class and averages without weights. Does not account for class imbalance. When all classes are equally important regardless of size.
F1 (weighted) Computes the F1 score per class and averages weighted by class support. When classes are imbalanced.
Gini Measures overall predictive power in binary classification by ranking samples by likelihood of belonging to the positive class. A value of 0% means no ability to distinguish between classes. When you need to evaluate ranking quality in imbalanced datasets.
Lift Measures how much better the model predicts positive cases compared to random chance. A value greater than 1 means the model outperforms random selection. When identifying top-performing cases is critical.
LogLoss Measures the confidence of predictions by comparing predicted probabilities with actual class labels. Lower is better. Considers prediction probabilities rather than rounded class labels. When prediction confidence matters, not just the final class label.
Precision The fraction of relevant samples among retrieved samples. Ranges from 0 to 1. When minimizing false positives is important, even if some relevant samples are missed.
Precision (macro) Computes precision independently for each class and averages without weights. When all classes are equally important regardless of size.
Precision (weighted) Computes precision per class and averages weighted by class support. When classes are imbalanced.
Recall The fraction of relevant samples found out of all relevant samples. Ranges from 0 to 1. When capturing as many relevant samples as possible is important, even if some false positives occur.
Recall (macro) Computes recall independently for each class and averages without weights. When all classes are equally important regardless of size.
Recall (weighted) Computes recall per class and averages weighted by class support. When classes are imbalanced.