Naive Bayes Part 2

In this python machine learning tutorial for beginners we will build email spam classifier using naive bayes algorithm. We will use sklearn CountVectorizer to convert email text into a matrix of numbers and then use sklearn MultinomialNB classifier to train our model. The model score with this approach comes out to be very high (around 98%). Sklearn pipeline allows us to handle pre processing transformations easily with its convenient api. In the end there is an exercise where you need to classify sklearn wine dataset using naive bayes.

Exercise: Code:

Topics that are covered in this Video:

00:00 explore spam email dataset

02:33 sklearn CountVectorizer

04:30 types of naive bayes classifiers

05:23 sklearn MultinomialNB classifier

06:48 sklearn pipeline

09:35 Exercise