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

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.

Authors

Publication Details

Journal
JIKO (Jurnal Informatika dan Komputer)
Published
2025-06-28
DOI
https://doi.org/10.33387/jiko.v8i2.9865
Primary Topic
Data Mining and Machine Learning Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Wenripin Chandra, Ferawaty Ferawaty, Steven Tiang, Mangasa A. S. Manulang
JIKO (Jurnal Informatika dan Komputer)
Data Mining and Machine Learning Applications
article

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

Wenripin Chandra, Ferawaty Ferawaty, Steven Tiang, Mangasa A. S. Manulang
article en

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.

JIKO (Jurnal Informatika dan Komputer)Vol. 8(2)
Openalex Percentile: Top 68%
Data Mining and Machine Learning Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.