## Multi-label

Precision/Recall and f-scores all work for multi-label classification, although they have bad qualities in unbalanced classes.

## Unbalanced class problems

TBD.

## Metric Zoo

One of the less abstruse summaries of these is the scikit-learn classifier loss page, which includes both formulae and verbal descriptions; this is surprisingly hard to find on, e.g. the documentation for deep learning toolkits, in keeping with the field’s general taste for magical black boxes.

### Matthews correlation coefficient

Due to Matthews (Matt75). This is the first choice for seamlessly handling multi-label problems, since its behaviour is reasonable for 2 class or multi class, balanced or unbalanced, and it’s computationally very cheap. Unless you have a very different importance for your classes, this is a good default.

However, it is not differentiable with respect to classification certainties, so you can’t use it as, e.g., a target in neural nets; Therefore you use surrogate measures which are differentiable and use this to track your progress.

#### 2-class case

Take your \(2 times 2\). confusion matrix of true positive, false positives etc.

#### Multiclass case

Take your \(K times K\) confusion matrix \(C\), then

### ROC/AUC

Receiver Operator Characteristic/Area Under Curve. Supposedly dates back to radar operators in the mid-century. HaMc83 talk about the AUC for radiology; Supposedly Spac89 introduced it to machine learning, but I haven’t read the article in question. Allows you to trade off importance of false positive/false negatives.

### Cross entropy

I’d better write down form for this, since most ML toolkits are curiously shy about it.

Let \(x\) be the estimated probability and \(z\) be the supervised class label. Then the binary cross entropy loss is

If \(y=\operatorname{logit}(x)\) is not a probability but a logit, then the numerically stable version is

### f-measure et al

TBD.

## Refs

- FlHF11: (2011) A Coherent Interpretation of AUC as a Measure of Aggregated Classification Performance. In Proceedings of the 28th International Conference on Machine Learning (ICML-11) (pp. 657–664).
- HaMc83: (1983) A method of comparing the areas under receiver operating characteristic curves derived from the same cases.
*Radiology*, 148(3), 839–843. DOI - LoJR08: (2008) AUC: a misleading measure of the performance of predictive distribution models.
*Global Ecology and Biogeography*, 17(2), 145–151. DOI - Goro04: (2004) Comparing two K-category assignments by a K-category correlation coefficient.
*Computational Biology and Chemistry*, 28(5–6), 367–374. DOI - Matt75: (1975) Comparison of the predicted and observed secondary structure of T4 phage lysozyme.
*Biochimica et Biophysica Acta (BBA) - Protein Structure*, 405(2), 442–451. DOI - Powe07: (2007) Evaluation: from Precision, Recall and F-measure to ROC, Informedness, Markedness and Correlation.
- ReWi11: (2011) Information, Divergence and Risk for Binary Experiments.
*Journal of Machine Learning Research*, 12(Mar), 731–817. - Hand09: (2009) Measuring classifier performance: a coherent alternative to the area under the ROC curve.
*Machine Learning*, 77(1), 103–123. DOI - JHMJ16: (2016) Semi-Supervised Learning via Sparse Label Propagation.
*ArXiv:1612.01414 [Cs, Stat]*. - Spac89: (1989) Signal Detection Theory: Valuable Tools for Evaluating Inductive Learning. In Proceedings of the Sixth International Workshop on Machine Learning (pp. 160–163). San Francisco, CA, USA: Morgan Kaufmann Publishers Inc.