Skip to content Skip to sidebar Skip to footer

Finding AUC Score For SVM Model

I understand that Support Vector Machine algorithm does not compute probabilities, which is needed to find the AUC value, is there any other way to just find the AUC score? from sk

Solution 1:

You don't really need probabilities for the ROC, just any sort of confidence score. You need to rank-order the samples according to how likely they are to be in the positive class. Support Vector Machines can use the (signed) distance from the separating plane for that purpose, and indeed sklearn does that automatically under the hood when scoring with AUC: it uses the decision_function method, which is the signed distance.

You can also set the probability option in the SVC (docs), which fits a Platt calibration model on top of the SVM to produce probability outputs:

model_ksvm = SVC(kernel='rbf', probability=True, random_state=0)

But this will lead to the same AUC, because the Platt calibration just maps the signed distances to probabilities monotonically.


Post a Comment for "Finding AUC Score For SVM Model"