A Comparative Study of Naive Bayes and Enhanced Random Forest Algorithms in Spam Detection - M. Arunkrishna; B. Mukunthan; B. Senthilkumaran (Science and Technology: Developments and Applications Vol. 3, 2025)
Online Social Networks (OSNs) or simply social Media such as Facebook, X (Formerly known as Twitter), Instagram have recently emerged as one of the crucial platforms in human communication worldwide that allows individual users to send messages, build friendships, share perceptions and voice out their opinions, and get inspired. In this era of technology, online social media has become a rapidly growing phenomenon. The main social media platforms such as Instagram, Facebook, and X (formerly known as Twitter) connect and unite people globally, as quickly as any other communication medium. The growth of social media is expected to increase tremendously in the future. Online social media users generate and consume information independently. Many domains recognize the vital role of analyzing social media data, as this can improve operations and enable organizations to stay competitive. Nowadays, people spend a significant amount of time on social media platforms. However, the growing popularity of social media has also led to an increase in spamming and hacking activities. Cyber-criminals often spam and hack through external phishing sites or malware downloads, which pose significant security risks and poor user experience in social media networks. To combat the issue of spam, several methods have been proposed, but there is still no perfect, effective solution for detecting spam with high accuracy. In this chapter, we propose a spam detection approach using Naive Bayes (NB) and Enhanced Random Forest (ERF) classifiers. The Naive Bayes classifier applies Bayes’ theorem with feature independence assumptions, while the Enhanced Random Forest improves on the traditional Random Forest with optimized feature handling. In order to assess the effectiveness of the proposed model, metrics such as accuracy, precision, recall and F1 scores are used to compare the model’s performance in recognizing spam messages. In conclusion, this study emphasizes that Enhanced Random Forest is more balanced in terms of efficiency and performance for social network spam detection and it can perform well with lower computational requirements.