1

Possible Duplicate:
Naive Bayes for two continuous features

I've seen that Multinomial Naive Bayes classifier in Sklearn accepts real valued feature vectors.

I previously assumed that Multinomial Naive Bayes classifier only handles discrete values

If I were to design a multinomial Naive Bayes classifier of my own, how would I handle real valued feature vectors?

garak
  • 2,033
  • 4
  • 26
  • 31

1 Answers1

1

One way to handle this is by "binning" -- the domain of the real value is binned into a finite set of intervals, and then each example is placed at the relevant bin.

You can read more about it in the following Wikipedia page:

http://en.wikipedia.org/wiki/Naive_Bayes_classifier

starting at "Another common ..."

singleton
  • 26
  • 1