1

How would I go about attaching a probability to the prediction outputted by a Gaussian Naive Bayes model ? I'm asking because the predict_proba function U can use with sklearn's Gaussian Naive Bayes classifier only gives me zeros or one, which is not what I want.

mmwindel
  • 21
  • 1

1 Answers1

0

I'm not familiar with sklearn NB methods but it's likely that these are actually the predicted probabilities. NB is known to often assign extreme probabilities, i.e. close to either 0 or 1. This issue implies that the probabilities predicted by NB are not really meaningful, i.e. they cannot (usually) be interpreted as "there is an x % chance that this instance belongs to this class" for example.

Erwan
  • 24,823
  • 3
  • 13
  • 34
  • Thanks for the answer, this is similar to what I read over the last couple of days, the probabilities don't mean much when using Naive Bayes. A possible remedy is to use calibration. [link](https://datascience.stackexchange.com/questions/9411/spark-ml-naive-bayes-classifier-often-assigns-1-as-probability-prediction?rq=1) [link](https://scikit-learn.org/stable/auto_examples/calibration/plot_calibration.html) – mmwindel Jun 08 '20 at 06:38