A simple Machine Learning project that detects spam vs ham (not spam) messages using text classification techniques in Python with scikit-learn.
This project demonstrates a complete ML pipeline including data loading, text preprocessing, feature extraction, model training, and prediction.
- Spam detection using Naive Bayes
- Text vectorization using TF-IDF
- Supports SMS / Email-style text
- Beginner-friendly implementation
- Fast and lightweight execution
- Load the SMS Spam dataset
- Preprocess and clean text
- Convert text into numerical features (TF-IDF)
- Train a classification model
- Predict spam or ham messages
MACHINE-LEARNING-EMAIL-SPAM-DETECTION/
│
├── spam_detector.py # Main Python script for training & prediction
├── sample_sms.csv # Sample SMS dataset
├── SMSSpamCollection # Full SMS Spam Collection dataset
├── smsspamcollection.zip # Zipped version of dataset
├── requirements.txt # Project dependencies
├── run.log # Program execution logs
├── README.md # Project documentation