Advertisement

Accuracy calculator

Enter the four counts from a binary classifier. Accuracy measures the share of all observations that were classified correctly.

Calculator

Accuracy
90.000000%
Error rate
10.000000%
Correct classifications
90.000000
Total observations
100.000000

Advertisement

How this calculator works

Add the true positives and true negatives, then divide by the total of all four cells. Counts must be non-negative whole numbers and the total must be positive. Accuracy treats each error equally; it can look impressive when the positive class is rare. Compare it with sensitivity and precision before assessing a classifier.

Formula

Accuracy = (TP + TN) / (TP + TN + FP + FN). Error rate = (FP + FN) / total.

Worked example

With 40 true positives, 50 true negatives and 5 of each error type, 90 of 100 classifications are correct: accuracy is 90% and the error rate is 10%.

Advertisement

Frequently asked questions

What does a true positive mean?

The classifier predicts positive and the reference label is also positive. The reference labels must be defined consistently.

Can a classifier have high accuracy and miss every positive?

Yes. If only 1% of observations are positive, predicting negative for everyone gives 99% accuracy and zero sensitivity.

Does accuracy measure a numerical prediction error?

This page measures classification accuracy. For continuous predictions, error measures such as mean absolute error answer a different question.

Sources

Advertisement