The Influence of User Sentiment Analysis on the Free Nutritious Meal Program Using K-Nearest Neighbors and Logistic Regression Methods

Authors

  • Ainun Mardiana Universitas Negeri Semarang, Indonesia
  • Zaenal Abidin Universitas Negeri Semarang, Indonesia

DOI:

https://doi.org/10.54518/rh.5.4.2025.779

Keywords:

Free Nutritious Meal Program, K-Nearest Neighbors, Logistic Regression, Sentiment Analysis, Social Media X, TF-IDF

Abstract

The free nutritious meal program aims to reduce stunting, but its success relies on public support. This study analyzes public sentiment toward the program on social media X using K-Nearest Neighbors (KNN) and Logistic Regression (LR) algorithms with TF-IDF, a method to weigh important words. A total of 2,000 tweets were collected and preprocessed through cleaning, normalization, tokenization, stop word removal, and stemming. Exploratory Data Analysis (EDA) revealed predominantly positive sentiment, with class imbalance addressed using SMOTE, a data balancing technique. The KNN model achieved 78%–81% accuracy, with strong positive class performance, but weak negative class detection, due to data imbalance. Similarly, the LR model achieved 80%–81% accuracy, with positive recall ranging from 0.96 to 0.98 and negative recall ranging from 0.22 to 0.27, resulting in an F1-score below 0.38. Neutral sentiments had minimal impact. These results highlight model bias toward positive sentiments, underscoring the need for adaptive approaches to improve minority sentiment detection. The findings offer policymakers insights to address concerns about budget and implementation, enhancing trust in social programs.

Downloads

Download data is not yet available.

References

Ajzen, I. (1991). The theory of planned behavior. Organizational Behavior and Human Decision Processes, 50(2), 179–211.

Alam, F., & Lucas, J. (2021). Social media, misinformation, and hate speech: A systematic literature review. Online Information Review, 45(5), 939–955.

Anggriyani, W., & Fakhriza, M. (2024). Analisis sentimen program makan gratis pada media sosial X menggunakan metode NLP. Journal of Computer System and Informatics (JoSYC), 5(4), 1033–1042.

Attaulah, D. T., & Soyusiawaty, D. (2025). Analisis sentimen program makan siang gratis di Twitter/X menggunakan metode BI-LSTM. Edumatic: Jurnal Pendidikan Informatika, 9(1), 294–303.

Azhari, M., & Parjito, P. (2024). Analisis sentimen opini publik program makan siang gratis dengan random forest pada media. Building of Informatics, Technology and Science (BITS), 6(3), 1932–1942.

Badan Pusat Statistik. (2023). Profil anak usia dini. Jakarta: BPS.

Briollais, L., & Durrieu, G. (2017). Quantile regression for genetic and genomic applications. In Handbook of Quantile Regression (pp. 347–364). Boca Raton: CRC Press.

Cover, T. M., & Hart, P. E. (1952). Nearest neighbor pattern classification. IEEE Transactions on Information Theory, 13(1), 21–27.

Das, S., Bhattacharyya, K., & Sarkar, S. (2023). Performance analysis of logistic regression, naive bayes, KNN, decision tree, random forest and SVM on hate speech detection from Twitter. International Research Journal of Innovations in Engineering and Technology, 7(3), 1–9.

Davidson, T., Warmsley, D., Macy, M., & Weber, I. (2017, May). Automated hate speech detection and the problem of offensive language. In Proceedings of the international AAAI conference on web and social media (Vol. 11, No. 1, pp. 512-515).

Febrilliani, J. S., & Wibowo, A. (2025). Twitter public sentiment towards vasectomy in Indonesia using SVM and Naïve Bayes. Research Horizon, 5(4), 1415–1424.

Ghiassi, M., Skinner, J., & Zimbra, D. (2013). Twitter brand sentiment analysis: A hybrid system using N-Gram Analysis and Dynamic Artificial Neural Network. Expert Systems with Applications, 40(16), 6266–6282.

Grossman, D. A., & Frieder, O. (2004). Information retrieval: Algorithms and heuristics. Dordrecht: Springer.

Happer, C., & Philo, G. (2013). The role of the media in the construction of public belief and social change. Journal of Social and Political Psychology, 1(1), 321–336.

Hayaty, M., & Pratama, A. H. (2023). Performance of lexical resource and manual labeling on Long Short-Term Memory Model for Text Classification. Jurnal Ilmiah Teknik Elektro Komputer Dan Informatika, 9(1), 74–84.

Ilham, M., & Priambodo, B. (2024). Analisis sentimen publik terhadap program makan siang gratis menggunakan BERT Neural Network pada platform X. JEMSI, 6(2), 1–10.

Irsansaputra, H. V., & Udjulawa, D. (2024). Sentiment analysis of public comments on “Program Makan Siang Gratis” using KNN and SMOTE Algorithm. CEPAT Journal of Computer Engineering: Progress, Application and Technology, 3(2), 2963–6728.

James, G., Witten, D., Hastie, T., & Tibshirani, R. (2013). An introduction to statistical learning: with applications in R. New York: Springer.

Kumar, A., & Sebastian, T. M. (2012). Sentiment analysis: A perspective on its past, present and future. International Journal of Intelligent Systems and Applications, 4(10), 1–14.

Liu, B. (2016). Sentiment Analysis: Mining Opinions, Sentiments, and Emotions. Cambridge: Cambridge University Press.

Mamo, Y., Li, R., & Zhang, T. (2024). Natural language processing applications in social media analysis: A systematic review. Information Processing & Management, 61(1), 222-235.

Nugroho, Y., & Syarief, A. (2022). Social media discourse and policy acceptance in Indonesia. Jurnal Ilmu Komunikasi, 19(2), 153–166.

Pravina, A. M., Cholissodin, I., & Adikara, P. P. (2019). Analisis sentimen tentang opini maskapai penerbangan pada dokumen twitter menggunakan algoritme Support Vector Machine (SVM). Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, 3(3), 1–10.

Putra, M., Anwar, M., & Sari, D. (2021). Analisis sentimen media sosial terhadap kandidat pemilu. Jurnal Sosioteknologi, 20(1), 23–34.

Rachmawati. (2025). Siswa sekolah di Yahukimo Papua menolak program makan bergizi gratis, kenapa? Kompas.com. Retrieved on March 6, 2025, from https://www.kompas.com/sulawesi-selatan/read/2025/02/06/121200888/siswa-sekolah-di-yahukimo-papua-menolak-program-makan-bergizi?page=all#:~:text=Mengapa%20ratusan%20siswa%20Yahukimo%20gelar,yang%20takut%2C%22%20papar%20Donny.

Rahma, F., Triana, D., & Amali, M. T. (2024). Analisis framing pemberitaan program kerja makan siang gratis Prabowo-Gibran dalam media online Liputan6.Com dan Republika.co.id. Publikasi Unitri, 13(3), 100–110.

Rahman, A., & Wibowo, A. (2020). Twitter analysis for disaster response: A study of sentiment and topic modeling during natural disasters in Indonesia. Procedia Computer Science, 179(1), 441–448.

Romli, I., Prameswari, R. S., & Kamalia, A. Z. (2021). Sentiment analysis about Large-Scale Social Restrictions in social media Twitter using K-Nearest Neighbor Algorithm. Jurnal Online Informatika, 6(1), 96–102.

Salton, G., Wong, A., & Yang, C. S. (1975). A vector space model for automatic indexing. Communications of the ACM, 18(11), 613–620.

Septiani, N., Handayani, P., & Azzahro, F. (2022). Social media sentiment analysis for public policy evaluation in Indonesia. Procedia Computer Science, 197(1), 525–532.

Sugiarti, S., Arsi, P., Subarkah, P., & V, J. (2024). Sentiment analysis of Indonesian government policy in the era of social commerce: Public perception and reaction. Bulletin of Social Informatics Theory and Application, 8(2), 236–246.

Sugiyono. (2013). Metode penelitian kuantitatif, kualitatif, dan R&D (Cetakan ke-19). Bandung: Alfabeta.

Wijati, D., Atika, P. D., Setiawati, S., & Rasim, R. (2024). Sentiment analysis of application reviews using the K-Nearest Neighbors (KNN) algorithm. PIKSEL: Penelitian Ilmu Komputer Sistem Embedded and Logic, 12(1), 209-218.

Wong, T. T. (2015). Performance evaluation of classification algorithms by k-Fold and Leave-One-Out Cross Validation. Pattern Recognition, 48(9), 2839–2846.

World Health Organization. (2023). Levels and trends in child malnutrition. Geneva: WHO.

Downloads

Published

2025-08-30

How to Cite

Mardiana, A., & Abidin, Z. (2025). The Influence of User Sentiment Analysis on the Free Nutritious Meal Program Using K-Nearest Neighbors and Logistic Regression Methods. Research Horizon, 5(4), 1655–1668. https://doi.org/10.54518/rh.5.4.2025.779

Similar Articles

<< < 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 > >> 

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