Improved Spam Email Detection Performance Based on Naïve Bayes Approach TF-IDF Vectorizer with Multi-Metric Optimization

Elpa Triana, Ade Irma Purnamasari, Agus Bahtiar, Edi Tohidi · Journal of Artificial Intelligence and Engineering Applications (JAIEA) · 2025

Email spam has become a serious threat to user productivity and security in digital communication, particularly regarding malware and phishing risks. This study aims to develop and evaluate a more effective email spam detection system model using the Naïve Bayes algorithm optimized with TF-IDF Vectorizer, focusing on improving detection accuracy and handling language variations.The research methodology uses a Knowledge Discovery in Databases (KDD) approach with email message datasets collected from STMIK IKMI Cirebon students during the 2020-2024 period via Google Takeout. The data processing involves comprehensive preprocessing stages, including text cleaning, tokenization, stemming using Sastrawi for Indonesian, and data transformation using TF-IDF Vectorization. The model was evaluated using various data split ratios (90:10, 80:20, 70:30, and 60:40) to test system consistency and reliability. Experimental results show very satisfactory performance, with the 80:20 data split ratio achieving the highest accuracy of 92%. The model demonstrates a good balance between precision (0.94) for spam and (0.91) for non-spam, as well as recall values (0.91) for spam and (0.94) for non-spam. ROC Curve analysis yielded consistently high AUC values (0.96-0.97) across all data split ratios, indicating strong discriminative capability in distinguishing spam and legitimate emails. This research provides a significant contribution to developing more effective and efficient email filtering systems to protect users from various cyber threats.

Read the paper · More papers on PaperTik