← AI Terminology
Accuracy
Accuracy is the fraction of predictions a model gets correct out of all predictions made.
It is computed as (True Positives + True Negatives) / Total Predictions.
It is computed as (True Positives + True Negatives) / Total Predictions.
Why It Matters in AI
Accuracy is the most intuitive classification metric and the first number most stakeholders ask for. It becomes misleading on imbalanced datasets — a model that predicts "not fraud" for every transaction achieves 99.9% accuracy while detecting zero fraud. That's why Precision, Recall, and F1 Score exist alongside it.
Key Points
| Aspect | Description |
|---|---|
| Range | 0.0 to 1.0 (or 0%–100%) |
| Formula | (TP + TN) / (TP + TN + FP + FN) |
| Variants | Top-5 accuracy (image classification), balanced accuracy (adjusts for class imbalance) |
| When to use | Balanced classes where all error types cost roughly the same |
| Common tools | sklearn.metrics.accuracy_score(y_true, y_pred) |
| When to avoid | Imbalanced datasets — a 99% "not-fraud" model looks great but is useless |
Simple Analogy
Accuracy is your exam score: if you answer 90 out of 100 questions correctly, your accuracy is 90%. But if 95 questions were about the same easy topic, that score says little about whether you understood the hard material.
Common Usage Examples
accuracy_score(y_test, y_pred)in scikit-learn- ImageNet top-1 and top-5 accuracy — standard benchmarks for image classification models
- GPT-4 achieving 90%+ accuracy on MMLU (massive multitask language understanding)
- Balanced accuracy:
balanced_accuracy_score— averages recall per class - Reporting accuracy alongside F1 in model cards to give a fuller picture
Summary
In short: Accuracy tells you how often a model is right — straightforward but treacherous when classes are unequal.