How irfan-farzand/spam-detection-ml works
This repository is a notebook-based SMS spam-classification project, not a deployed messaging service. Its documented workflow runs from labeled data and message preprocessing through TF-IDF and Logistic Regression to prediction and evaluation; trained artifacts can be saved and reused. The graph reflects README documentation only: no source excerpts were available to verify notebook internals or finer-grained calls.
Main entry points: email_spam_predicition.ipynb Logistic Regression · spam_model.pkl Trained classifier · tfidf_vectorizer.pkl Saved vectorizer · SMSSpamCollection Labeled SMS data
Components 11
Data preparation
- Labeled SMS data
dataset/SMSSpamCollection - Text preprocessing
notebook/email_spam_predicition.ipynb - Train/test split
notebook/email_spam_predicition.ipynb
Classification
- TF-IDF features
notebook/email_spam_predicition.ipynb - Logistic Regression
notebook/email_spam_predicition.ipynb - Spam or ham
notebook/email_spam_predicition.ipynb
Evaluation
- Model evaluation
notebook/email_spam_predicition.ipynb - 5-fold validation
notebook/email_spam_predicition.ipynb
Saved artifacts
- Trained classifier
model/spam_model.pkl - Saved vectorizer
model/tfidf_vectorizer.pkl
Other components
- SMS messages
Connections 12
- Labeled SMS data → Text preprocessing: loads for
README.md - SMS messages → Text preprocessing: enters
README.md - Text preprocessing → Train/test split: prepares for
README.md - Train/test split → TF-IDF features: feeds
README.md - TF-IDF features → Logistic Regression: provides features
README.md - Logistic Regression → Spam or ham: classifies
README.md - Logistic Regression → Model evaluation: evaluated by
README.md - Logistic Regression → 5-fold validation: validated by
README.md - Logistic Regression → Trained classifier: saved as
README.md - TF-IDF features → Saved vectorizer: saved as
README.md - Trained classifier → Spam or ham: reused for
README.md - Saved vectorizer → Spam or ham: transforms input
README.md