2014-08-28 5:47 GMT+02:00 Josh Wasserstein <[email protected]>:
> What prior does scikit-learn use for MultinomialNB?  The documentation says:
>
> class_prior : array-like, size (n_classes,)
> Prior probabilities of the classes. If specified the priors are not adjusted
> according to the data.
>
> For N classes, one typically uses a Dirichlet prior, but this prior would be
> specified with N positive values (for the concentration parameters), not
> with N probabilities (quantities bounded between 0 and 1). So MultinomialNB
> seems to be using something different. What is it?

This class prior is just the P(y) in P(y|x) = (P(x|y) × P(y))  / Z.
It's a simple multinomial.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to