0

I used MultinomialNB() from scikit-learn. Using predict_proba, how can I interpret these probabilites? My initial guess was: a probability of 0.8 means that the classifier is 80% certain that class X is the right class.

I found a related question, but no answers were provided.

Nick West
  • 3
  • 2

1 Answers1

3

Your intuition is correct. As you can read in documentation, predict_proba returns the probability of the samples for each class in the model. So, if we assume that you have 4 classes in your trained model and predict_proba returns [0.6, 0.2, 0.19, 0.01] (it's always sums up to 1) it is saying that your data is first class with 60% probability, second with 20% etc.

Documentation: https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.MultinomialNB.html

  • Okay thanks! Do you happen to know what happens with the interpretation once the probabilities are calibrated? (https://scikit-learn.org/stable/modules/calibration.html) – Nick West Feb 11 '20 at 10:24
  • Interpretation of probabilities are always the same, calibration is changing only their values. – Adrian Stępniak Feb 11 '20 at 10:34