Abstract
Spam in emails has been a prevalent issue ever since the inception of the email service. However, the use of ensemble (aggregate) and non-ensemble algorithms for the detection and filtering of spam has been less explored. In this paper, we develop certain ensemble and non-ensemble machine learning (ML) algorithms for classifying emails as spam or ham (i.e., not spam). Using the Enron-SMS dataset from the UCI ML repository and an 80 and 20% training and test split, we develop and calibrate non-ensemble ML algorithms like KNN, Naïve Bayes, and Support Vector Machine. Also, we develop and calibrate ensemble ML algorithms containing the non-ensemble algorithms via voting, bagging, and boosting methods. Results reveal that the non-ensemble Support Vector Machine performed the best with 98.47% accuracy on test data and it was followed by the ensemble voting algorithm with 96.80% accuracy on test data. We highlight the implications of using non-ensemble and ensemble methods for spam classification in the real world.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
B. Dada et al, Machine learning for email spam filtering: review, approaches and open research problems. Heliyon 5(6) (2019)
W.A. Awad, S.M. ELseuofi, Machine learning methods for spam E-Mail classification. Int. J. Comput. Sci. Inform. Technol. 3 (2011). 10.5121/ijcsit.2011.3112
A. Harisinghaney, A. Dixit, S. Gupta, A. Arora, Text and image-based spam email classification using KNN, Naïve Bayes and Reverse DBSCAN algorithm, in 2014 International Conference on Reliability Optimization and Information Technology (ICROIT), Faridabad, pp. 153–155 (2014)
W. Feng, J. Sun, L. Zhang, C. Cao, Q. Yang, A support vector machine based naive Bayes algorithm for spam filtering, in 2016 IEEE 35th International Performance Computing and Communications Conference (IPCCC), Las Vegas, NV, pp. 1–8 (2016)
Y. Chen, C. Lu, C. Huang, Anti-spam filter based on Naïve Bayes, SVM, and KNN model (2009)
Z. Yang, X. Nie, W. Xu, J. Guo, An approach to spam detection by Naive Bayes ensemble based on decision induction, in International Conference on Intelligent Systems Design and Applications, vol. 2, pp. 861–866. https://doi.org/10.1109/isda.2006.253725
J. Carpinter, Evaluating ensemble classifiers for spam filtering (2005)
S. Trivedi, S. Dey, Interplay between probabilistic classifiers and boosting algorithms for detecting complex unsolicited emails. J. Adv. Comput. Netw. 132–136 (2013). https://doi.org/10.7763/jacn.2013.v1.27
M.F. Saeedian, H. Beigy, Spam detection using dynamic weighted voting based on clustering, in 2008 Second International Symposium on Intelligent Information Technology Application, Shanghai, pp. 122–126 (2008)
C.W. Geng, Q. Li, L. Xu, X. Jin, Boosting the performance of web spam detection with ensemble under-sampling classification, in Fourth International Conference on Fuzzy Systems and Knowledge Discovery (FSKD 2007), Haikou, pp. 583–587 (2007)
T.A. Almeida, J.M.G. Hidalgo, A. Yamakami, Contributions to the study of SMS spam filtering: new collection and results, in Proceedings of the 2011 ACM Symposium on Document Engineering (DOCENG’11), Mountain View, CA, USA (2011). https://archive.ics.uci.edu/ml/datasets/SMS+Spam+Collection. http://www.dt.fee.unicamp.br/~tiago/smsspamcollection/
NLTK library for Python. https://www.nltk.org/
CountVectorizer. https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html
TfidfTransformer. https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfTransformer.html
C.M. Bishop, Pattern recognition and machine learning (Springer, 2006)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Agarwal, K., Uniyal, P., Virendrasingh, S., Krishna, S., Dutt, V. (2021). Spam Mail Classification Using Ensemble and Non-Ensemble Machine Learning Algorithms. In: Joshi, A., Khosravy, M., Gupta, N. (eds) Machine Learning for Predictive Analysis. Lecture Notes in Networks and Systems, vol 141. Springer, Singapore. https://doi.org/10.1007/978-981-15-7106-0_18
Download citation
DOI: https://doi.org/10.1007/978-981-15-7106-0_18
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-15-7105-3
Online ISBN: 978-981-15-7106-0
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)