Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    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:

    bash$ pip install pandas_ml

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