A Machine Learning project for detecting spam emails using Natural Language Processing (NLP).
The project preprocesses email text, extracts features using TF-IDF Vectorization, trains a Naive Bayes classifier, and predicts whether an email is Spam or Ham through a simple deployment pipeline.
- Email text preprocessing
- Text cleaning
- TF-IDF Vectorization
- Naive Bayes Classification
- Model serialization using Pickle
- Spam/Ham prediction
- Ready for deployment
The dataset contains labeled email messages.
Target classes:
- Spam
- Ham
- Python
- Pandas
- NumPy
- Scikit-learn
- NLTK
- Pickle
- Jupyter Notebook
- Load Dataset
- Clean Text
- Remove Stopwords
- TF-IDF Vectorization
- Train/Test Split
- Train Naive Bayes Model
- Evaluate Model
- Save Model
- Predict New Emails
spam-email-classifier
│
├── dataset
├── models
├── notebooks
├── README.md
├── requirements.txt
└── .gitignore
pip install -r requirements.txtOpen the notebook:
notebooks/project_deployment.ipynb
Basmala Khaled