ANALISIS KOMPARATIF KINERJA LOGISTIC REGRESSION DAN RANDOM FOREST BERBASIS TF-IDF UNTUK KLASIFIKASI SENTIMEN KOMENTAR TIKTOK TERHADAP PROGRAM MAKAN BERGIZI GRATIS - Febriza Evan Nugraha; Ibni Faiq Athallah; Marrylinteri Istoningtyas (Sekolah Tinggi Manajemen Informatika dan Komputer Jayakarta, 2026)
Sentiment analysis of public policy on social media has become increasingly important as public participation in digital spaces continues to grow. This study compares the performance of Logistic Regression and Random Forest algorithms based on TF-IDF for classifying the sentiment of TikTok comments regarding the Free Nutritious Meal Program into three classes: positive, neutral, and negative. The dataset consists of 4,811 public comments collected from six TikTok videos between January and June 2026. After preprocessing and manual labeling, 3,884 valid comments were obtained with a sentiment distribution of 39.73% negative, 37.97% positive, and 22.30% neutral. Class imbalance was addressed using SMOTE on the training data, and the dataset was split using an 80:20 stratified split. Evaluation results show that Logistic Regression outperformed Random Forest across all metrics, achieving an accuracy of 0.76 and a macro F1-score of 0.74 compared to Random Forest's accuracy of 0.73 and macro F1-score of 0.71. In both models, the neutral class consistently showed the lowest performance, indicating semantic ambiguity that cannot be optimally captured by frequency-based feature representations. This study provides empirical evidence that Logistic Regression is more suitable for Indonesian social media text sentiment classification with TF-IDF representation, and recommends exploring context-based models such as IndoBERT for future research.