3
$\begingroup$

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.

$\endgroup$

1 Answer 1

1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.