Jiko (Jurnal Informatika dan komputer)
Vol 8, No 2 (2025)

COMPARISON OF NAÏVE BAYES CLASSIFIER AND K-NEAREST NEIGHBOR ALGORITHMS IN SENTIMENT ANALYSIS ON SOCIAL MEDIA X WITH VADER LEXICON

Tiang, Steven (Unknown)
Chandra, Wenripin (Unknown)
Ferawaty, Ferawaty (Unknown)
Manulang, Mangasa A. S. (Unknown)



Article Info

Publish Date
28 Jun 2025

Abstract

The increasing use of social media as a platform for expressing public opinion has established platform X (formerly Twitter) an important data source for sentiment analysis. However, the ever-growing volume of data and the lack of sentiment labels present significant challenges for manual analysis, which is inefficient and time-consuming. This research addresses the problem of selecting effective algorithms for accurate and efficient sentiment classification on large-scale unlabeled data. The study aims to compare the performance of the Naïve Bayes Classifier and K-Nearest Neighbor (KNN) algorithms in sentiment classification related to the Value Added Tax (VAT) increase on platform X. To support classification accuracy, sentiment labeling is performed automatically using the VADER Lexicon. The research methodology involves data scraping, automatic sentiment labeling, implementation and training of classification models, and performance evaluation using a Confusion Matrix and ROC curve. The results show that the KNN algorithm with k = 1 achieved the best performance with an accuracy of 93.19%, precision of 94.07%, recall of 92.96%, a misclassification error of 6.81%, and an AUC of 0.95. In contrast, the Naïve Bayes Classifier achieved an accuracy of 88.29%, precision of 87.43%, recall of 86.67%, misclassification error of 11.71%, and an AUC of 0.93. Therefore, KNN is proven to be superior in classifying sentiment more accurately and efficiently than the Naïve Bayes Classifier.

Copyrights © 2025






Journal Info

Abbrev

jiko

Publisher

Subject

Computer Science & IT

Description

Jiko (Jurnal Informatika dan Komputer) Ternate adalah jurnal ilmiah diterbitkan oleh Program Studi Teknik Informatika Universitas Khairun sebagai wadah untuk publikasi atau menyebarluaskan hasil - hasil penelitian dan kajian analisis yang berkaitan dengan bidang Informatika, Ilmu Komputer, Teknologi ...