Skip to content



A quick and simple classification and anomaly detection metric defined as the number of true positives over the number of samples in the testing set. Since Accuracy gives equal weight to false positives and false negatives, it is not a good metric for datasets with a highly imbalanced distribution of labels.

\[ {\displaystyle Accuracy = \frac{TP}{TP + FP}} \]

Estimator Compatibility: Classifier, Anomaly Detector

Score Range: 0 to 1


This metric does not have any parameters.


use Rubix\ML\CrossValidation\Metrics\Accuracy;

$metric = new Accuracy();