Accuracy
Accuracy is the proportion of correct predictions (both true positives and true negatives) out of all predictions.
Definition
, the fraction of predictions that are correct.
Accuracy alone is misleading for imbalanced datasets — a model predicting "not fraud" 99% of the time has 99% accuracy.
Intuition
Use accuracy when classes are roughly balanced and all errors have similar costs.
For skewed classes, accuracy can be gamed by predicting the majority class — always check the confusion matrix.
Worked example
99 fraud cases out of 10,000: predicting "no fraud" for all gives 99.01% accuracy but zero recall for fraud.
A medical test with 95% accuracy means 5% of sick patients are misdiagnosed — is that acceptable?
The math
Accuracy is the complement of the error rate: .
For -class classification, accuracy is .
In practice
Appropriate when baseline (predicting majority class) is the main competitor and classes are balanced.
Always report alongside precision, recall, and F1 when publishing results.
Go deeper
More in Data science
Assembled from the ReLU.chat curated knowledge base. These explanations are concise on purpose; check the sources for anything important.