ANALISIS SENTIMEN PROGRAM MAKAN BERGIZI GRATIS MENGGUNAKAN SVM DAN KNN DENGAN TF-IDF DAN TF-ABS
DOI:
https://doi.org/10.24843/MTK.2026.v15.i01.p496Keywords:
Sentiment Analysis, Machine Learning, SVM, KNN, TF-IDF, TF-ABSAbstract
The Free Nutritious Meal Program, initiated by the government to improve child and maternal health, has generated varied public responses on social media. This study aims to classify public sentiment toward the program by applying machine learning models to social media text data. The dataset used consists of 9000 tweets from Platform X that have been manually labeled into positive, negative, and neutral categories. Classification was performed using Support Vector Machine (SVM) and K-Nearest Neighbor (KNN) algorithms combined with two term weighting techniques Term Frequency-Inverse Document Frequency (TF-IDF) and Term Frequency-Absolute (TF-ABS). The performance of each model was evaluated using accuracy, precision, recall, and F1-score. The results show that SVM model with TF-ABS achieved the best performance with 99.69% accuracy, precision 99.69%, recall 99.68%, and F1-score 99.68%. The KNN model with TF-ABS also performed well, reaching 95.55% accuracy. In contrast, models employing TF-IDF demonstrated noticeably lower performance, with the SVM achieving an accuracy of [75,53%] and the KNN reaching [70,89%], indicating a clear performance gap compared to the TF-ABS weighting scheme. This research provides insights into suitable machine learning models and term weighting methods for sentiment analysis of public opinion on government programs using social media data.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 SEVIRA HUKMAN MAJIDAH, PUTRIAJI HENDIKAWATI

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

E-Jurnal Matematika (MTK) is licensed under a Creative Commons Attribution License (CC BY-NC 4.0)
