A clean, end-to-end machine learning project for classifying SMS messages as spam or ham (not spam) using Python. The repository includes a reproducible workflow from data loading and EDA through model training and evaluation.
- Python (pandas, numpy, scikit-learn, matplotlib, seaborn)
- Jupyter Notebook
.
├── Spam SMS Classication.ipynb # Main notebook (EDA → preprocessing → modeling → evaluation)
├── README.md
├── requirements.txt
├── LICENSE
├── .gitignore
└── data/ # (optional) place raw data here or link in notebook
If your dataset is external, add a short note or a download script in the notebook showing how to fetch it.
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activatepip install -r requirements.txtjupyter notebook "Spam SMS Classication.ipynb"or with JupyterLab:
jupyter lab- Exploratory Data Analysis (class balance, message length stats, word clouds if applicable)
- Text cleaning (lowercasing, punctuation/stopword removal, stemming/lemmatization if used)
- Feature engineering (e.g., TF-IDF or CountVectorizer)
- Model training (e.g., Logistic Regression, SVM, Naive Bayes)
- Evaluation (Accuracy, Precision, Recall, F1-score, Confusion Matrix, ROC-AUC)
Add a screenshot or table of your best model metrics here, e.g.
Model Accuracy Precision Recall F1
LogisticRegression 0.98 0.98 0.97 0.98
(Replace with your actual results.)
- Set a fixed
random_statewhere applicable. - Note any preprocessing steps and parameters inside the notebook.
- Keep dataset path configurable (e.g., via a variable like
DATA_PATH).
This project is released under the MIT License. See LICENSE for details.
- Dataset: (Add dataset source link if you used one, e.g., UCI SMS Spam Collection)