-
Notifications
You must be signed in to change notification settings - Fork 0
Platt scaling
-
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
Platt scaling uses the distance to the decision boundary and scales it in a way to result in probabilities for the point x belonging to class y. Points with a greater distance to the decision boundary have a higher probability then points that are very near to the decision boundary.
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.623&rep=rep1&type=pdf
- Split the train data set into training set and Cross Validation set
- Train the model on the training data set
- Score test data set and Cross Validation data set
- Run a logistic model on the Cross Validation data set using the actual dependent variable and the predicted values.
- 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.
Platt scaling as calibration can be used to improve the outcome of the classifier.
https://jmetzen.github.io/2015-04-14/calibration.html
https://jmetzen.github.io/2014-08-16/reliability-diagram.html