Description: Fit a sigmoid function to the discriminant values produced by an SVM, and use the sigmoid to compute probabilities. This program is based upon pseudocode given in "Probabilistic outputs for support vector machines and comparison to to regularized likelihood methods" by Platt.
Usage: fit-sigmoid <train labels> <train predictions> <test predictions<
Inputs:
Output:
The program prints to standard output a version of the test predictions file with an additional column. This column contains probabilities corresponding to each of the given discriminant values. The parameters of the sigmoid (A and B) are included in an additional line at the end of the header. The formula for converting a discriminant value X into a probability is 1 / (1 + exp(A * X + B)). Also, the second column of the predictions file contains binary class predictions based upon the probabilities (using a threshold of 50%), rather than based upon the discriminants.
Options: None.
Calls: none