How to Build a Spam Classifier in 10 Steps

Samima Khan
Towards Data Science
7 min readAug 10, 2020

--

If you’re just starting out in Machine Learning, chances are you’ll be undertaking a classification project. As a beginner, I built an SMS spam classifier but did a ton of research to know where to start. In this article, I’ll walk you through my project in 10 steps to make it easier for you to build your first spam classifier using Tf-IDF Vectorizer, and the Naïve Bayes model!

1. Load and simplify the dataset

Our SMS text messages dataset has 5 columns if you read it in pandas: v1 (containing the class labels…

--

--

Forging my learner path in Web design and development, one skill at a time. Currently an undergrad student pursuing Computer Science.