What is the difference between predict_proba and decision_function?

Updated May 17, 2026

Short answer

predict_proba returns class probabilities, while decision_function returns raw confidence scores.

Deep explanation

predict_proba outputs normalized probabilities (0–1) for each class, typically used in probabilistic interpretation. decision_function returns unbounded scores representing distance from decision boundary. Some models like SVM use decision_function instead of probabilities unless calibrated.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Scikit-Learn interview questions

View all →