Perbandingan Metode Naïve Bayes dan K-Nearest Neighbor dalam Analisis Sentimen Terhadap Program Makan Bergizi Gratis

WATTIMENA, Christy Inda (2026) Perbandingan Metode Naïve Bayes dan K-Nearest Neighbor dalam Analisis Sentimen Terhadap Program Makan Bergizi Gratis. Undergraduate thesis, Universitas Katolik Widya Mandira.

[img] Text
ABSTRAK.pdf

Download (645kB)
[img] Text
BAB I.pdf

Download (271kB)
[img] Text
BAB II.pdf
Restricted to Repository staff only

Download (425kB)
[img] Text
BAB III.pdf
Restricted to Repository staff only

Download (517kB)
[img] Text
BAB IV.pdf
Restricted to Repository staff only

Download (1MB)
[img] Text
BAB V.pdf

Download (245kB)
[img] Text
DAFTAR PUSTAKA DAN SURAT BEBAS PLAGIAT.pdf

Download (350kB)

Abstract

The Free Nutritious Meal (MBG) Program is a government social policy that has elicited various public responses on social media. This study aims to analyze public sentiment toward the MBG Program and compare the performance of Naïve Bayes (NB) and K-Nearest Neighbor (KNN) algorithms in text-based sentiment classification. Research data was collected from the X platform using keywords related to MBG during the period of August 1, 2025, to September 30, 2025, with a total of 15,854 Indonesian-language tweets. After cleaning and preprocessing, 14,169 valid tweets were used for modeling. Preprocessing stages included case folding, punctuation removal, stopword removal (with normalization), tokenizing, and stemming. Furthermore, text features were formed using TF-IDF weighting, and the data was split into training and testing sets with a 70:30 ratio using the Stratify technique. Classification was conducted into three sentiment classes: negative, neutral, and positive. The results showed that the sentiment distribution was dominated by negative sentiment at 55.09% (7,805 data), followed by neutral sentiment at 23.25% (3,294 data) and positive sentiment at 21.67% (3,070 data). Performance evaluation using accuracy, precision, recall, and F1-score metrics showed that Naïve Bayes achieved an accuracy of 72%, while KNN achieved an accuracy of 71%. Considering the overall accuracy and performance characteristics per class, Naïve Bayes provided better performance on this research dataset.

Item Type: Thesis (Undergraduate)
Uncontrolled Keywords: Sentiment Analysis, Naïve Bayes, K-Nearest Neighbor, Free Nutritious Meals Program, X Social Media, Text Mining, TF-IDF
Subjects: Q Science > QA Mathematics > QA75 Electronic computers. Computer science
Q Science > QA Mathematics > QA76 Computer software
Divisions: Fakultas Teknik > Program Studi Ilmu Komputer
Depositing User: Christy Inda Wattimena
Date Deposited: 11 Mar 2026 04:03
Last Modified: 11 Mar 2026 04:03
URI: http://repositori.unwira.ac.id/id/eprint/24119

Actions (login required)

View Item View Item