Solved – Estimators of MultinomialNB classification

Does anyone knows how sklearn.naive_bayes.MultinomialNB estimates the model ?

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

And how can i know the importance of each features (like the P-Value in a linear regression) ?

I'm running this example of text classification :
http://scikit-learn.org/stable/tutorial/text_analytics/working_with_text_data.html

I would like to know on which word it classifies.

Your first question is quite broad. Are you asking for how a Multinomial Naive Bayes works or what the sklearn code does to perform its estimation? The documentation references this site which explains how it works.

As for the second question, feature importance, the value each feature's coefficient is one measure of its importance. You can find the coefficient value in clf.coef_. The larger the value, the more likely that feature is associated with the target class.

Similar Posts:

Rate this post

Leave a Comment