
Spam_Email
Problem Statment
Email is a powerful tool for communication It is one of the most popular and secure mediums for online transferring and communicating messages or data through the web.But, due to social networks, most of the emails contain unwanted information which is called spam. Identifying such spam emails is one of the important challenges. In this project, we will use the PYTHON text classification technique to identify or classify email spam messages. On Email Dataset, we will also compare which algorithm is best for text classification.
We will also download the different nltk packages for this project.
Task:
Email messages spam or not spam
How many messages are Spam or not spam? In this dataset. We check by pie plot
# Text Preprocessing
and follow will these essential steps.
Convert the all words lower case.
Tokenizaton
Remove the special characters.
Remove punctuation
Stemming
After Training with different Model Results
CountVectorizer Result

TfidfVectorizer Results

TfidfVectorizer with Max feature Results

I got the best results with Tfidfvectorizer with Max feature. MultinomialNB model showing the best result
Model
MNB => PrecisionScore = 1.000000 AccScore = 0.973888 f1_Score = 0.872038
0 likes · 6 views · Mar 19, 2025
Email is a powerful tool for communication It is one of the most popular and secure mediums for online transferring and communicating messages.