Why can an SVM's predict and predict_proba outputs disagree when probability estimates come from Platt scaling?

Quick Overview

Asks why an SVM's class predictions and its Platt-scaled probability estimates can point to different classes. Tests how the sigmoid is fitted through internal cross-validation and what makes the two outputs disagree in binary and multiclass problems.

Why can an SVM's predict and predict_proba outputs disagree when probability estimates come from Platt scaling?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why can an SVM's `predict` and `predict_proba` outputs disagree when probability estimates come from Platt scaling? Assume a kernel SVM such as scikit-learn's `SVC` trained with `probability=True`. ```hint Two decision rules Write down the rule `predict` applies to the decision value, then the rule you would apply to the probability. Check whether they cut at the same place. ``` ```hint Where the sigmoid comes from Ask which data the sigmoid's parameters are fitted on, and how the multiclass case combines several binary models in each method. ``` ### What a Strong Answer Covers - How each method turns the model into a class decision, and how the Platt sigmoid is fitted - What can make the two outputs disagree in the binary case - What can make them disagree in the multiclass case - The run-to-run variation that internal cross-validation introduces - Practical ways to get consistent outputs, and when probabilities are not needed at all ### Follow-up Questions - Why is the sigmoid fitted on out-of-fold decision values instead of the training decision values? - How would you check whether the resulting probabilities are well calibrated? - When would you choose isotonic regression over Platt scaling?

Overview: Asks why an SVM's class predictions and its Platt-scaled probability estimates can point to different classes. Tests how the sigmoid is fitted through internal cross-validation and what makes the two outputs disagree in binary and multiclass problems.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Why can an SVM's predict and predict_proba outputs disagree when probability estimates come from Platt scaling?

Assume a kernel SVM such as scikit-learn's SVC trained with probability=True.

What a Strong Answer Covers Guidance

  • How each method turns the model into a class decision, and how the Platt sigmoid is fitted
  • What can make the two outputs disagree in the binary case
  • What can make them disagree in the multiclass case
  • The run-to-run variation that internal cross-validation introduces
  • Practical ways to get consistent outputs, and when probabilities are not needed at all

Follow-up Questions Guidance

  • Why is the sigmoid fitted on out-of-fold decision values instead of the training decision values?
  • How would you check whether the resulting probabilities are well calibrated?
  • When would you choose isotonic regression over Platt scaling?