least confidence using decision_function() method

Viewed 11

I am training a classifier using SVC for a multilabel classification of texts (each text can receive a maximum of 7 labels). I am using the decision_function() method to access the least confidence instances predicted so that I'll add the instances associated with the least confidence predictions to the training set and then retrain the model. I know that the sign means on which side of the hyperplane the instance is, but I need the ones that are the closest to the hyperplane (decision boundary). An example output is below:

array([[ 0.61233108,  0.54062144, -0.66884401, -0.71035247, -0.90944953,
    -0.41548433,  0.28489021],
   [-0.31800646, -0.25331301, -0.40985447, -0.43378177, -1.05672207,
    -0.75784478,  0.3211284 ],
   [-0.12395853,  0.72147455, -0.74207976, -0.97414168, -0.9492301 ,
    -0.56509169,  1.04885414]])

Which of these are the least confidence predictions? in first row the least confidence prediction would be 0.28489021 and -0.90944953 and in row 2 -1.05672207 and 0.3211284?

How to determine which are the least confidence predictions from this sample output so that I can create a function to extract them?

0 Answers
Related