Discussion:
[Scikit-learn-general] What is the relation between the decision function and the predicted probabilities?
Gil Rutter
2016-02-04 17:11:27 UTC
Permalink
Dear all,

Many classification models in Scikit-learn support the three class methods
predict(), predict_proba() and decision_function(), all taking a features
array X. I can tell by inspection that the predict function returns True
when the decision function is positive. However, what is the connection
between the decision function and the predicted probabilities? How does one
get from one to the other?

If it makes a difference, I am particularly interested in the MLPClassifier
(dev release 0.18) and I am working on multi-class, multi-label problems. I
know that the predicted probabilities arise directly from the activations
of the output layer, but I don't understand the decision function so well.

Best regards,

Gil
Andreas Mueller
2016-02-04 18:15:36 UTC
Permalink
I suggested to remove the decision_function from MLPClassifier, because
I feel it has little semantics.
It is the output before it goes through a softmax. So
softmax(decision_function) = predict_proba.

Andy
Post by Gil Rutter
Dear all,
Many classification models in Scikit-learn support the three class
methods predict(), predict_proba() and decision_function(), all taking
a features array X. I can tell by inspection that the predict function
returns True when the decision function is positive. However, what is
the connection between the decision function and the predicted
probabilities? How does one get from one to the other?
If it makes a difference, I am particularly interested in the
MLPClassifier (dev release 0.18) and I am working on multi-class,
multi-label problems. I know that the predicted probabilities arise
directly from the activations of the output layer, but I don't
understand the decision function so well.
Best regards,
Gil
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Loading...