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.
Best Answer
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:
- Solved – Naive Bayes Python implementation differences
- Solved – How does scikit-learn perform $chi^2$ feature selection on non-categorical features
- Solved – How to do feature transformation on data without knowing what the data mean
- Solved – How to do feature transformation on data without knowing what the data mean
- Solved – Latent semantic classification