In binary classification, we have this:
But how is it in multiclass classification?
We usually do not have any notions of positive or negative.
We only consider multiclass, not multilabel classification.
For accuracy, this is easy:
\(\text{Accuracy} = \frac{\text{Correct predictions}}{\text{All predictions}}\)
As always, accuracy is not the perfect measurement.
It disregards class balance and the cost of different errors.
https://www.evidentlyai.com/classification-metrics/multi-class-metrics
https://www.evidentlyai.com/classification-metrics/multi-class-metrics
To consider precision and recall in multiclass
classification,
obtain these metrics for each class
individually.
For Class A, this becomes:
\(\text{Precision}_{\text{Class A}} = \frac{\text{TP}_{\text{Class A}}}{\text{TP}_{\text{Class A}} + \text{FP}_{\text{Class A}}}\)
\(\text{Recall}_{\text{Class A}} = \frac{\text{TP}_{\text{Class A}}}{\text{TP}_{\text{Class A}} + \text{FN}_{\text{Class A}}}\)
https://www.evidentlyai.com/classification-metrics/multi-class-metrics
https://www.evidentlyai.com/classification-metrics/multi-class-metrics
https://www.evidentlyai.com/classification-metrics/multi-class-metrics