Skip to content

Platt scaling

Carolin Hainke edited this page Feb 25, 2018 · 3 revisions

What is it

  • transforms output from a classification model to a probability distribution over classes

  • fits a logistic regression model to a classifier's score

  • estimates probability P(y=1|x), even though the classifier does not provide this probability:

    • P(y=1|x)= 1 / 1 + exp (A f(x) + B)
    • A and B are estimated using maximum likelihood
  • usefull for SVMs, naive Bayes

  • less effective for well-calibrated models as logistic regression

https://en.wikipedia.org/wiki/Platt_scaling

How to use it

  1. Split the train data set into training set and Cross Validation set
  2. Train the model on the training data set
  3. Score test data set and Cross Validation data set
  4. Run a logistic model on the Cross Validation data set using the actual dependent variable and the predicted values.
  5. Score the test data set using the model created in step 4 with feature as the output of scoring on test data set in step 3.

https://www.analyticsvidhya.com/blog/2016/07/platt-scaling-isotonic-regression-minimize-logloss-error/

Clone this wiki locally