Loading…
Glossary term
The share of a model's predictions that are correct.
Accuracy is the fraction of predictions that are correct. If a model gets 90 of 100 right, its accuracy is 90%.
It can mislead when classes are imbalanced: a model that always says 'no fraud' is 99% accurate if only 1% of cases are fraud, yet useless.
Accuracy
correct = sum(p == y for p, y in zip(predictions, labels))
accuracy = correct / len(labels)It is the simplest metric, so always check it alongside precision and recall.