Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use log-probability estimates in GaussianNB [scikit-learn]?

I'm currently using scikit-learn's GaussianNB package.

I've noticed that I can choose to return results for the classification several different ways. One way to return a classification is using the predict_log_proba method.

Why would I choose to use predict_log_proba versus predict_proba versus predict?

like image 270
T.S. Avatar asked Dec 02 '13 19:12

T.S.


1 Answers

  • predict just gives you the class for every example
  • predict_proba gives you the probability for every class, and predict is just taking the class which maximal probability
  • predict_log_proba gives you the logarithm of the probabilities, this is often handier as probabilities can become very, very small
like image 105
Martin Böschen Avatar answered Sep 23 '22 03:09

Martin Böschen