The Spam Email Classifier is a Machine Learning project that detects whether an email or SMS message is Spam or Not Spam (Ham) based on its content.
The project uses Natural Language Processing (NLP) techniques and the Multinomial Naive Bayes algorithm for text classification.
- Classifies emails as Spam or Not Spam.
- Cleans and preprocesses text data.
- Converts text into numerical features using TF-IDF.
- Trains a Machine Learning model.
- Displays model accuracy and evaluation metrics.
- Allows users to test their own email messages.
- Python
- Pandas
- NumPy
- Scikit-learn
- TF-IDF Vectorizer
- Multinomial Naive Bayes
Spam_Email_Classifier/
│── spam_classifier.py
│── spam.csv
│── README.md
│── requirements.txt
Install the required libraries:
pip install pandas numpy scikit-learnRun the following command:
python spam_classifier.pyMODEL PERFORMANCE
Accuracy: 1.0
Enter an email message:
> Congratulations! You have won a free iPhone.
Result: SPAM EMAIL
- Multinomial Naive Bayes
The project uses a CSV file (spam.csv) containing spam and ham email messages.
- Build a graphical user interface (GUI).
- Create a web application using Flask.
- Use a larger dataset for better accuracy.
- Compare Naive Bayes with Support Vector Machine (SVM).
Puja Patnabi Sri Kollu
B.Tech Student
Machine Learning Internship Project