Comparative Analysis of Machine Learning Algorithms for Email Spam Detection
Author
Jenifer Mary , Dr. Nancy Jasmine Goldena
Abstract
The rapid growth of electronic communication has led to a significant increase in spam emails, which may contain unwanted advertisements, fraudulent content, phishing attempts, and potentially harmful links. Traditional rule-based spam filtering methods may not effectively identify changing spam patterns. This paper, “Comparative Analysis of Machine Learning Algorithms for Email Spam Detection,” focuses on developing a machine learning-based system to classify emails as spam or ham. The email dataset is first cleaned and preprocessed, followed by TF-IDF (Term Frequency–Inverse Document Frequency) feature extraction to convert textual email content into numerical features. Four machine learning algorithms, namely Multinomial Naive Bayes, Logistic Regression, Support Vector Machine (SVM), and Random Forest, are implemented and compared. Their performance is evaluated using accuracy, precision, recall, and F1-score, along with confusion matrices. Based on the experimental results, SVM achieved the highest accuracy of 98.03% and showed the best overall performance among the compared algorithms. The developed system also supports email analysis through a user interface and Gmail integration for analyzing inbox messages.
Keywords
Email Spam Detection, Machine Learning, TF-IDF, Multinomial Naive Bayes, Logistic Regression, Support Vector Machine, Random Forest, Text Classification, Precision, Recall, F1-Score.
Full Text:
Download Paper PDF
References
[1] T. A. Almeida, J. M. G. Hidalgo, and A. Yamakami, "Contributions to the study of SMS spam filtering: New collection and results," in Proc. ACM Symposium on Document Engineering.
[2] F. Pedregosa et al., "Scikit-learn: Machine Learning in Python," Journal of Machine Learning Research.
[3] C. Cortes and V. Vapnik, "Support-vector networks," Machine Learning.
[4] L. Breiman, "Random Forests," Machine Learning.
[5] G. Salton and C. Buckley, "Term-weighting approaches in automatic text retrieval," Information Processing & Management. [6] M. Karthikai Lakshmi and J. Steffi, "Development of an Interactive Satellite Data Analytics Tool Using Streamlit," International Journal of Research Publication and Reviews, vol. 7, no. 3, pp. 3876–3881, Mar. 2026.
Share your valuable work from Social Media Buttons