ANALISIS SENTIMEN PROGRAM MAKAN BERGIZI GRATIS MENGGUNAKAN SVM DAN KNN DENGAN TF-IDF DAN TF-ABS

Authors

  • SEVIRA HUKMAN MAJIDAH Universitas Negeri Semarang
  • PUTRIAJI HENDIKAWATI Universitas Negeri Semarang

DOI:

https://doi.org/10.24843/MTK.2026.v15.i01.p496

Keywords:

Sentiment Analysis, Machine Learning, SVM, KNN, TF-IDF, TF-ABS

Abstract

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.

Author Biographies

SEVIRA HUKMAN MAJIDAH, Universitas Negeri Semarang

Program Studi Matematika, Universitas Negeri Semarang

PUTRIAJI HENDIKAWATI, Universitas Negeri Semarang

Program Studi Matematika, Universitas Negeri Semarang

Downloads

Published

2026-02-24

How to Cite

MAJIDAH, S. H., & HENDIKAWATI, P. (2026). ANALISIS SENTIMEN PROGRAM MAKAN BERGIZI GRATIS MENGGUNAKAN SVM DAN KNN DENGAN TF-IDF DAN TF-ABS. E-Jurnal Matematika, 15(1), 1–9. https://doi.org/10.24843/MTK.2026.v15.i01.p496

Issue

Section

Articles

Similar Articles

You may also start an advanced similarity search for this article.