How does one do platt's scaling for multi-label classification? For example, if the final layer of my DNN is a soft-max activation with 10 classes, then how does platt's scaling work exactly?

Do I train multiple logistic regressions using one-vs-many classification? Or is there a better way?

  • 1
    $\begingroup$ I assume you mean multiclass classification, which is different to multilabel classification. Multilabel is where a single instance can have several class labels associated with it, while multiclass classification is where each instance has a single class label, where there are at least three classes. $\endgroup$ – timleathart Feb 21 '19 at 1:51

There are a few multiclass variants of Platt scaling. The easiest approach is as you have described; simply perform one Platt scaling on each class.

However, there are more sophisticated options--a very simple one to implement is training a standard logistic regression on the logits (the values before the softmax activation is applied). This has called matrix scaling and can overfit pretty easily, so only use this if you have a large calibration set. Alternatively, a fewer-parameter version called vector scaling is relatively simple to implement, where the weights matrix inside the logistic regression is restricted to be a diagonal matrix. Finally, a very simple option that has been shown to work well for neural networks is temperature scaling, where all logits are simply scaled by a single scalar parameter.

You can read more about these and their application to neural networks in Section 4.2 of "On Calibration of Modern Neural Networks" (2017) - available here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.