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

InstructorHannah Davis

Share this video with your friends

Send Tweet

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.