ANALISIS SENTIMEN PROGRAM MAKAN BERGIZI GRATIS DI MEDIA SOSIAL X MENGGUNAKAN TF-IDF DAN PERBANDINGAN ALGORITMA MACHINE LEARNING

Authors

  • Weliansyah Weliansyah Institut Sains dan Bisnis Atma Luhur
  • Muhamad Kurniawan Universitas Pertiba

DOI:

https://doi.org/10.30606/rjocs.v12i2.4838

Keywords:

TF-IDF, Logistic Regression, Support Vector Machine, Naive Bayes, Free Nutritious Meal Program

Abstract

The Free Nutritional Meal Program (MBG) is a government policy that has generated various public responses on social media X. The large volume of opinions generated makes sentiment analysis an effective approach to automatically identify public perception. This study aims to analyze public sentiment towards the Free Nutritional Meal Program and compare the performance of the Naive Bayes, Logistic Regression, and Support Vector Machine (SVM) algorithms in classifying sentiment. The study uses a quantitative approach based on Natural Language Processing (NLP) with stages of data collection, preprocessing, sentiment labeling using a lexicon approach, feature extraction using Term Frequency–Inverse Document Frequency (TF-IDF), data division using Stratified Train-Test Split, validation using Stratified K-Fold Cross Validation, parameter optimization through GridSearchCV, and model evaluation using Accuracy, Precision, Recall, F1-Score, Confusion Matrix, and ROC Curve. The results show that the crawling process produced 2,798 tweets, then after preprocessing obtained 2,703 tweets used in the classification process. The sentiment distribution shows a predominance of positive sentiment towards the Free Nutritional Meal Program. All algorithms performed well in classification after parameter optimization. Based on the evaluation results, Logistic Regression performed best, followed by Support Vector Machine, while Naive Bayes yielded competitive results as a comparison model. This study demonstrates that the combination of preprocessing, lexicon-based labeling, TF-IDF feature extraction, and model optimization produces effective sentiment classification and can be utilized to support data-driven public policy evaluation.

Downloads

Download data is not yet available.

References

T. Walasary, “Survey Paper tentang Analisis Sentimen,” KONSTELASI Konvergensi Teknol. Dan Sist. Inf., vol. 2, no. 1, Apr. 2022, doi: 10.24002/konstelasi.v2i1.5378.

Salsabila Septiani, Nabila Putri, Dara Jessica, and Arya Saputra, “Sentiment Analysis Of Social Media Data Using Deep Learning Techniques,” Int. J. Comput. Technol. Sci., vol. 1, no. 2, pp. 08–14, Apr. 2024, doi: 10.62951/ijcts.v1i2.59.

Z. Drus and H. Khalid, “Sentiment Analysis in Social Media and Its Application: Systematic Literature Review,” Procedia Comput. Sci., vol. 161, pp. 707–714, 2019, doi: 10.1016/j.procs.2019.11.174.

I. Najiyah and M. Rizal, “Analisis Sentimen Media Sosial X Terhadap Kebijakan Presiden Republik Indonesia Prabowo Subianto,” vol. 15, no. 3.

A. Sitanggang, Y. Umaidah, Y. Umaidah, R. I. Adam, and R. I. Adam, “ANALISIS SENTIMEN MASYARAKAT TERHADAP PROGRAM MAKAN SIANG GRATIS PADA MEDIA SOSIAL X MENGGUNAKAN ALGORITMA NAÏVE BAYES,” J. Inform. Dan Tek. Elektro Terap., vol. 12, no. 3, Aug. 2024, doi: 10.23960/jitet.v12i3.4902.

K. O. Yu, “An Opinion Word Lexicon and a Training Dataset for Russian Sentiment Analysis of Social Media”.

O. Alsemaree, A. S. Alam, S. S. Gill, and S. Uhlig, “Sentiment analysis of Arabic social media texts: A Machine Learning approach to deciphering customer perceptions,” Heliyon, vol. 10, no. 9, p. e27863, May 2024, doi: 10.1016/j.heliyon.2024.e27863.

N. Hadi and D. Sugiarto, “Analisis Sentimen Pembangunan IKN pada Media Sosial X Menggunakan Algoritma SVM, Logistic Regression dan Naïve Bayes,” J. Inform. J. Pengemb. IT, vol. 10, no. 1, pp. 37–49, Jan. 2025, doi: 10.30591/jpit.v10i1.7106.

O. N. Julianti, N. Suarna, and W. Prihartono, “PENERAPAN NATURAL LANGUAGE PROCESSING PADA ANALISIS SENTIMEN JUDI ONLINE DI MEDIA SOSIAL TWITTER,” JATI J. Mhs. Tek. Inform., vol. 8, no. 3, pp. 2936–2941, May 2024, doi: 10.36040/jati.v8i3.9613.

I. Hendrawan Rifky, E. Utami, and A. Hartanto Dwi, “Analisis Perbandingan Metode Tf-Idf dan Word2vec pada Klasifikasi Teks Sentimen Masyarakat Terhadap Produk Lokal di Indonesia,” Smart Comp Jurnalnya Orang Pint. Komput., vol. 11, no. 3, Jul. 2022, doi: 10.30591/smartcomp.v11i3.3902.

F. M. Sarimole, “Analisis Sentimen Terhadap Aplikasi Satu Sehat Pada Twitter Menggunakan Algoritma Naive Bayes Dan Support Vector Machine,” vol. 5, no. 3, 2024.

H. Syah and A. Witanti, “ANALISIS SENTIMEN MASYARAKAT TERHADAP VAKSINASI COVID-19 PADA MEDIA SOSIAL TWITTER MENGGUNAKAN ALGORITMA SUPPORT VECTOR MACHINE (SVM),” J. Sist. Inf. Dan Inform. Simika, vol. 5, no. 1, pp. 59–67, Feb. 2022, doi: 10.47080/simika.v5i1.1411.

S. Fachlevi, A. A. Unde, and H. Hasrullah, “Analisis Sentimen Publik pada Tagar #KawalPutusanMK di Media Sosial X,” J. Syntax Admiration, vol. 5, no. 10, pp. 4232–4241, Oct. 2024, doi: 10.46799/jsa.v5i10.1691.

P. P. O. Mahawardana, G. A. Sasmita, and I. P. A. E. Pratama, “Analisis Sentimen Berdasarkan Opini dari Media Sosial Twitter terhadap ‘Figure Pemimpin’ Menggunakan Python,” JITTER J. Ilm. Teknol. Dan Komput., vol. 3, no. 1, p. 810, Jan. 2022, doi: 10.24843/JTRTI.2022.v03.i01.p17.

K. Pramayasa, I. M. D. Maysanjaya, and I. G. A. A. D. Indradewi, “Analisis Sentimen Program Mbkm Pada Media Sosial Twitter Menggunakan KNN Dan SMOTE,” SINTECH Sci. Inf. Technol. J., vol. 6, no. 2, pp. 89–98, Aug. 2023, doi: 10.31598/sintechjournal.v6i2.1372.

R. Vindua and A. U. Zailani, “Analisis Sentimen Pemilu Indonesia Tahun 2024 Dari Media Sosial Twitter Menggunakan Python,” JURIKOM J. Ris. Komput., vol. 10, no. 2, p. 479, Apr. 2023, doi: 10.30865/jurikom.v10i2.5945.

Downloads

Published

30-07-2026

How to Cite

[1]
W. Weliansyah and M. Kurniawan, “ANALISIS SENTIMEN PROGRAM MAKAN BERGIZI GRATIS DI MEDIA SOSIAL X MENGGUNAKAN TF-IDF DAN PERBANDINGAN ALGORITMA MACHINE LEARNING”, RJOCS , vol. 12, no. 2, pp. 22–40, Jul. 2026.