Klasifikasi Pesan Penipuan pada Platform WhatsApp Menggunakan Metode Naïve Bayes Berbasis TF-IDF, N-Gram, dan Chi-Square - Hardika Nur Saputra; Ardytha Luthfiarta (Forum Kerjasama Pendidikan Tinggi, 2026)
The rapid development of digital communication has led to an increase in message exchanges across various platforms, accompanied by the widespread spread of fraudulent messages (scams). This situation demands an automated system capable of identifying and classifying messages quickly and accurately. This study aims to develop a text-based message classification system on the WhatsApp platform using the Naïve Bayes algorithm. The research stages include text preprocessing consisting of case folding, cleaning, normalization, stopword removal, and stemming to improve data quality. Next, feature extraction is carried out using Term Frequency-Inverse Document Frequency (TF-IDF) combined with the N-Gram (unigram) approach to represent each word in the text, and Chi-Square feature selection is applied to obtain the most relevant features in the classification process. The dataset used consists of three categories of WhatsApp messages: normal, promotional, and fraudulent. In addition, this study also applies a data balancing method using Random Oversampling to increase the number of minority class samples in the training data for optimal model performance. The main contribution of this research is the application of a combination of TF-IDF unigram, Chi-Square feature selection, and Random Oversampling in the Naïve Bayes algorithm to improve the classification performance of Indonesian WhatsApp messages, especially in conditions of unbalanced class distribution. Model evaluation is carried out using a Confusion Matrix with accuracy, precision, recall, and F1-score metrics. The test results show that the model built is able to achieve an accuracy level of 95.63%, so the method used is proven to be effective in classifying WhatsApp messages accurately and consistently.