Naive Bayes Spam Detection

View source on GitHub ↗

After learning about Bayes' theorem in my Discrete Structures class at Northeastern University, I came across an article explaining how it could be applied in real life. One of the examples was spam detection. The article described how using this model had made a huge difference in the early days of email, which caught my attention.

I became curious about how something we'd learned in class could help decide whether a message was spam. I wanted to make my own implementation for fun and see for myself how it worked, so I found a dataset on Kaggle and started building a Naive Bayes spam classifier.