Accuracy, precision, recall, and F1 score are metrics used to evaluate a machine-learning classification model. Accuracy measures overall correctness, precision measures how often positive predictions are correct, recall measures how many actual positives are identified, and F1 score balances precision and recall.
The Reasoning and Mechanism
These metrics are calculated from a confusion matrix:
| Term | Meaning |
|---|---|
| True positive (TP) | The model correctly predicts the positive class. |
| True negative (TN) | The model correctly predicts the negative class. |
| False positive (FP) | The model incorrectly predicts the positive class. |
| False negative (FN) | The model incorrectly predicts the negative class. |
| Metric | Formula and interpretation |
|---|---|
| Accuracy | . The proportion of all predictions that are correct. |