Research Horizon
Vol. 5 No. 4 (2025): Research Horizon - August 2025

The Influence of User Sentiment Analysis X on the Free Nutritious Food Program Using the K-Nearest Neighbors Method and Logistic Regression

Mardiana, Ainun (Unknown)
Abidin, Zaenal (Unknown)



Article Info

Publish Date
09 Sep 2025

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.

Copyrights © 2025






Journal Info

Abbrev

RH

Publisher

Subject

Arts Humanities Economics, Econometrics & Finance Education Law, Crime, Criminology & Criminal Justice Social Sciences

Description

The journal aims to make significant contributions to applied research and knowledge across the globe through the publication of original and high-quality research articles. It publishes original research articles, reviews, mini-reviews, case reports, letters to the editor, and commentaries, thereby ...