Metrics for multi-class classification
When moving to multi-class classification, you simply use the binary classification metrics that we have just seen, applied to each class, and then you summarize them using some of the averaging strategies that are commonly used for multi-class situations.
For instance, if you want to evaluate your solution based on the F1 score, you have three possible averaging choices:
- Macro averaging: Simply calculate the F1 score for each class and then average all the results. In this way, each class will count as much the others, no matter how frequent its positive cases are or how important they are for your problem, resulting therefore in equal penalizations when the model doesn’t perform well with any class:
- Micro averaging: This approach will sum all the contributions from each class to compute an aggregated F1 score. It results in no particular favor to or penalization of any class, since all the computations...