PERBANDINGAN ALGORITMA NAIVE BAYES DAN K-NEAREST NEIGHBORS DALAM ANALISIS SENTIMEN ULASAN PRODUK TOKOPEDIA - Purba, Windania; Panjaitan, Markus Sahat Maruli; Dawner, Elgin; Lumbantoruan, Marselina Dahlia H. (Jurnal Teknik Informasi dan Komputer (Tekinkom), 2025)
This study aims to classify public opinions on educational issues expressed through the social media platform Twitter using the Naïve Bayes Classifier algorithm. This method was chosen due to its capability to categorize text data into positive, negative, and neutral sentiment categories based on the assumption of attribute independence. The data used consists of a collection of tweets relevant to the topic of education, which were analyzed through the stages of preprocessing, feature extraction, classification, and model evaluation. The results of the study indicate that the model is able to classify opinions with an accuracy of 73% based on the Confusion Matrix. Further analysis shows a precision of 85% for the positive category, 79% for negative, and 88% for neutral, while the recall for the positive category reached 77%. These findings suggest that the Naïve Bayes algorithm is fairly effective in processing public opinion from social media and can serve as a reference for understanding public perceptions regarding educational issues.