Projects · Beginner · 3–4 hours
Build a spam filter
Train logistic regression from scratch on real text messages, then decide how strict the filter should be.
What you'll build
A spam classifier written in NumPy, with precision and recall at different thresholds and a look at which words it learned.
You'll need
Python 3 and NumPy where the code imports it. The SMS Spam Collection from the UCI Machine Learning Repository (archive.ics.uci.edu/dataset/228): 5,574 labelled text messages.
This project is part of Pro
The first two projects are free. Pro opens every lesson and every project.
See Pro plansFrom ₹119 a month. No auto-renewal.