For a binary SVC, predict uses decision_function internally. What decision rule is applied by default?
Correct answer
B. The sign of the score decides the class, with positive scores mapped to classes_[1] here
16 views
B. The sign of the score decides the class, with positive scores mapped to classes_[1] here
16 views
decision_function returns a signed distance from the separating hyperplane, and predict takes its sign, sending positive scores to classes_[1]. The magnitude is not a probability, so tuning a cut-off as though it were one is unreliable unless probability=True or CalibratedClassifierCV is used. This is also why decision_function values may exceed 1 or fall below 0.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is B? Ask here and get an explanation.