Home > Published Issues > 2023 > Volume 14, No. 2, 2023 >
JAIT 2023 Vol.14(2): 178-184
doi: 10.12720/jait.14.2.178-184

Comparison of Machine Learning Algorithms for Spam Detection

Azeema Sadia 1*, Fatima Bashir1, Reema Qaiser Khan 2, and Ammarah Khalid 3
1. Bahria University, Dept. of Computer Science, Karachi, Pakistan
2. Sir Syed University of Engineering & Technology, Dept. of Software Engineering, Karachi, Pakistan
3. Bahria University, Dept. of Software Engineering, Karachi, Pakistan
*Correspondence: azeemasadia.bukc@bahria.edu.pk (A.S.)

Manuscript received August 29, 2022; revised October 13, 2022; accepted October 31, 2022; published March 8, 2023.

Abstract—The Internet is used as a tool to offer people with endless knowledge. It is a global platform which is used for connectivity, communication, and sharing. At almost no cost, an individual can use the Internet to send email messages, update tweets, and Facebook messages to a vast number of people. These messages can also contain unsolicited advertisement which is identified as a spam. The company Twitter too is massively affected by spamming and it is an alarming issue for them. Twitter considers spam as actions that are unsolicited and repeated. These include tweet repetition, and the URLs that lead users to completely unrelated websites. The authors’ have worked with twitter’s dataset focusing on tweets about “iPhone”. It was collected by using an API which was further pre-processed. In this paper, content-based features have been selected that recognize the spamming tweet by using R. Multiple machine learning algorithms were applied to detect spamming tweets: Naive Bayes, Logistic Regression, KNN, Decision Tree, and Support Vector Machine. It was observed that the best performance was achieved by Naive Bayes Algorithm giving an accuracy of 89%.
Keywords—spam detection, twitter, Naive Bayes, machine learning, data analysis, artificial analysis

Cite: Azeema Sadia, Fatima Bashir, Reema Qaiser Khan, Amna Bashir, and Ammarah Khalid, "Comparison of Machine Learning Algorithms for Spam Detection," Journal of Advances in Information Technology, Vol. 14, No. 2, pp. 178-184, 2023.

Copyright © 2023 by the authors. This is an open access article distributed under the Creative Commons Attribution License (CC BY-NC-ND 4.0), which permits use, distribution and reproduction in any medium, provided that the article is properly cited, the use is non-commercial and no modifications or adaptations are made.