This Lesson is for PRO Members.

Subscribe today and get access to all lessons! Plus direct HD download
for offline use, member comment forums, and iTunes "podcast" RSS feed.
Level up your skills now!


Already subscribed? Sign In

Implement a Naive Bayes Classifier in Python and Scikit-learn to Categorize Text

We’ll use this probabilistic classifier to classify text into different news groups.

There are several types of Naive Bayes classifiers in scikit-learn. We will be using the Multinomial Naive Bayes model, which is appropriate for text classification. More can be found at Scikit-learn.

We'll also look at how to visualize the confusion matrix using pandas_ml.

To install pandas_ml, type:

$ pip install pandas_ml

into your terminal, or install it with your installer of choice.

Please take a moment to tell your friends:

You must be a PRO Member to view code