The Influence of User Sentiment Analysis on the Free Nutritious Meal Program Using K-Nearest Neighbors and Logistic Regression Methods - Mardiana, Ainun; Abidin, Zaenal (LifeSciFi, 2025)
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.