Step-by-step Calculation of Accuracy and Precision in Supervised Learning Systems

Supervised learning systems are evaluated using various metrics to determine their effectiveness. Two common metrics are accuracy and precision. Understanding how to calculate these metrics is essential for assessing model performance.

Calculating Accuracy

Accuracy measures the proportion of correct predictions made by the model out of all predictions. It is calculated using the formula:

Accuracy = (Number of Correct Predictions) / (Total Number of Predictions)

For example, if a model correctly predicts 90 out of 100 instances, the accuracy is 0.9 or 90%.

Calculating Precision

Precision focuses on the positive predictions made by the model. It indicates how many of the predicted positives are actual positives. The formula is:

Precision = (True Positives) / (True Positives + False Positives)

For instance, if a model predicts 50 positives, and 40 of these are correct, the precision is 0.8 or 80%.

Summary of Calculation Steps

  • Identify the total number of predictions and correct predictions for accuracy.
  • Count true positives and false positives for precision.
  • Apply the formulas to compute each metric.