Skip to content
Harshith Varma
All writing

Data Science

End-To-End ML Project: Spam Mail Classification

2024-07-15 · 10 min read

Building a model is just 10% of the journey. The rest is data collection, preprocessing, training, evaluation, deployment, and monitoring — the parts that don't show up in a notebook demo but decide whether anything actually ships.

This project works through all of it on a familiar problem: spam email classification, built on Kaggle's Spam Email Classification dataset.

The model

A neural network classifier trained on the dataset reaches 98% accuracy, with SMOTE handling the class imbalance that spam datasets tend to have (spam is, encouragingly, the minority class) and text vectorization turning raw email content into something the network can learn from.

Getting past the notebook

A lot of hesitation among people learning data science is less about modeling and more about everything after it — cloud deployment specifically tends to feel like a wall. This project deploys the trained classifier on AWS, with an automated deployment pipeline built to make that step repeatable rather than a one-time manual scramble.

The goal in writing this up was to make that deployment step feel accessible rather than intimidating — the same model, but finished.

Resources

The full project is available as a GitHub repository and a Kaggle notebook, alongside a live deployed application demonstrating the classifier running end to end.

Originally published on Medium

2024-07-15

Read on Medium (opens in a new tab)

Continue reading

All writing