1. Home
  2. Data Science
  3. Scikit-learn
  4. For a binary SVC, predict uses decision_function…

Added 30 Nov -0001

For a binary SVC, predict uses decision_function internally. What decision rule is applied by default?

  1. The score is compared with the training mean, which recentres the decision boundary
  2. The sign of the score decides the class, with positive scores mapped to classes_[1] here Correct answer
  3. The score is thresholded at 0.5, exactly mirroring a probability cut-off on a calibrated model
  4. The class with the larger absolute score wins, regardless of the score's overall sign

Correct answer

B. The sign of the score decides the class, with positive scores mapped to classes_[1] here

16 views

MCQSEXAM

Explanation

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.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Scikit-learn MCQs

Practise all Scikit-learn MCQs

Similar MCQs