The formula for classifier accuracy is:

Where:

  • Number of Correct Predictions: The sum of true positives (TP) and true negatives (TN).
  • Total Number of Predictions: The total number of samples, which is the sum of true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN).

Example:

If a classifier correctly predicts 90 samples out of 100, its accuracy would be 90%