AI & NLP, 2025
Email & SMS Spam Classifier
A text classifier that labels messages as spam or not spam, with a Streamlit interface for live predictions.
- Accuracy (MultinomialNB)
- 97.1%
- Precision
- 1.00
- Test messages
- 1,034
The problem
Spam filters must avoid false positives — flagging a real message as spam is worse than letting one spam through. With an imbalanced dataset, precision matters more than raw accuracy.
What it does
- Preprocessing with tokenisation, stop-word removal and Porter stemming.
- Compared Count and TF-IDF vectorisation and several Naive Bayes variants.
- Selected Multinomial Naive Bayes for zero false positives on the test set.
- Vectoriser and model pickled and loaded by the Streamlit app.
Built with
- Python
- scikit-learn
- NLTK
- TF-IDF
- Pandas
- Streamlit
From the repository
Screenshots and charts as they appear in the project's code and notebooks.

