Comparative Analysis of Logistic Regression and Random Forest with SMOTE for Sentiment Classification on Ethanol Policy in Indonesia

Authors

  • Nabiel Muhammad Al Ghazali Information System, Telkom University, Indonesia
  • Hanif Fakhrurroja School of Industrial Engineering, Telkom University, National Research and Innovation Agency, Indonesia

DOI:

https://doi.org/10.52436/1.jutif.2026.7.4.5717

Keywords:

Ethanol Policy, Imbalanced Data, Logistic Regression, Random Forest, Sentiment Analysis, SMOTE

Abstract

Public opinion plays a crucial role in the successful implementation of renewable energy policies, particularly regarding the transition to ethanol-based fuels in Indonesia. Understanding this sentiment is vital to mitigate social resistance and design effective communication strategies, as policy failure often stems from public rejection rather than technical issues. However, social media data regarding this topic is often highly imbalanced, with a dominance of non-positive sentiments (96%) compared to positive ones (4%), creating a severe bias in machine learning models known as the accuracy paradox. This study aims to classify public sentiment towards ethanol policy and evaluate the effectiveness of the Synthetic Minority Over-sampling Technique (SMOTE) in handling extreme class imbalance. The methods used include text preprocessing with Sastrawi, feature extraction using TF-IDF, and a comparative classification between Logistic Regression (LR) and Random Forest (RF). The novelty of this research lies in addressing the extreme imbalance in high-dimensional text data, proving that simpler linear models can outperform complex ensemble models in terms of minority class detection. The results show that the Optimized Logistic Regression model with SMOTE outperformed Random Forest, achieving a Precision of 1 and an F1-Score of 0.67 for the minority class, compared to RF which only reached an F1-Score of 0.55. This study concludes that for high-dimensional sparse text data, linear models combined with SMOTE provide superior performance in identifying minority sentiments.

Downloads

Download data is not yet available.

References

Wisuda and R. Fijra, “The Use of Renewable Energy in South Sumatra Province To Support REUN 2025 : An Analysis of Effectiveness,” Integrasi Jurnal Ilmiah Teknik Industri, vol. 6, no. 1, p. 1, 2021.

G. Lahope, “IMPLEMENTASI KEBIJAKAN ENERGI NASIONAL (KEN) INDONESIA MENUJU 23% TARGET BAURAN ENERGI BARU TERBARUKAN (EBT) 2025,” Jurnal Darma Agung, pp. 124–135, 2024, doi: 10.46930/ojsuda.v32i1.3945.

A. Joko Purwanto and S. Kimura, “Forecast of Biomass Demand Potential in Indonesia: Seeking a Business Model for Wood Pellets,” 2022.

D. Firmansyah, F. Alfredo Ahwiddhana, and R. Reinaldy Pramasha, “ANALISIS EKONOMI PEMANFAATAN ENERGI TERBARUKAN DI INDONESIA UNTUK PEMBANGUNAN BERKELANJUTAN,” JMA), vol. 2, pp. 3031–5220, 2024, doi: 10.62281.

A. R. Sembiring and C. K. Dewa, “Sentiment Analysis On Indonesian Tweets about the 2024 Election,” Sinkron, vol. 9, no. 1, pp. 413–422, Jan. 2025, doi: 10.33395/sinkron.v9i1.14481.

N. P. A. P. S. Putri, D. S. Angreni, and I. W. Sudarsana, “A Study on Sentiment Analysis of Public Response to The New Fuel Price Policy In 2022: A Support Vector Machine Approach,” InPrime: Indonesian Journal of Pure and Applied Mathematics, vol. 7, no. 1, pp. 88–100, May 2025, doi: 10.15408/inprime.v7i1.42717.

W. R. E. Putri, S. Suhendro, R. Azhar, N. Desriani, and A. C. Pramana, “Exploring Public Sentiment on Green Economy Policy: A Natural Language Processing-Based Analysis,” International Journal of Energy Economics and Policy, vol. 15, no. 2, pp. 560–565, Feb. 2025, doi: 10.32479/ijeep.18360.

M. Chaerul, S. Septiadi, and G. Triyono, “Analisis Sentimen Kebijakan Pembatasan Subsidi Bahan Bakar Minyak di Indonesia Tahun 2024 Menggunakan Algoritma Klasifikasi,” Jurnal Pendidikan dan Teknologi Indonesia, vol. 5, no. 5, pp. 1471–1484, May 2025, doi: 10.52436/1.jpti.825.

J. Hemmatian, R. Hajizadeh, and F. Nazari, “Addressing imbalanced data classification with Cluster-Based Reduced Noise SMOTE,” PLoS One, vol. 20, no. 2 February, Feb. 2025, doi: 10.1371/journal.pone.0317396.

C. Sintiya, G. H. Hutagaol, D. Bate`e, and S. Irviantina, “Evaluasi Teknik Resampling untuk Class Balancing dalam Analisis Sentimen Kesehatan Mental Berbasis Bi-LSTM,” Jurnal Sifo Mikroskil, vol. 26, no. 2, Oct. 2025, doi: 10.55601/jsm.v26i2.1799.

F. Rizka Mumtaz et al., “ANALISIS SENTIMEN PUBLIC TWITTER TERHADAP KEBIJAKAN PEMERINTAH MENGGUNAKAN METODE SVM ( STUDI KASUS : PROGRAM EFISIENSI ANGGARAN ),” 2025.

N. A. Siagian, S. P. Sipayung, A. Rikki, and N. Marbun, “Integrating SMOTE with XGBoost for Robust Classification on Imbalanced Datasets: A Dual-Domain Evaluation,” sinkron, vol. 9, no. 3, pp. 1094–1107, Jul. 2025, doi: 10.33395/sinkron.v9i3.15029.

S. A. Putri and R. Rachmatika, “Penerapan Algoritma Random Forest dan SMOTE untuk Prediksi Risiko Putus Sekolah Siswa Sekolah Menengah Kejuruan,” Decode: Jurnal Pendidikan Teknologi Informasi, vol. 5, no. 3, pp. 903–910, Oct. 2025, doi: 10.51454/decode.v5i3.1360.

A. Dendi Rachmatsyah, T. Sugihartono, and K. Irfan, “Perbandingan Teknik Optimasi Grid Search dan Randomized Search dalam Meningkatkan Akurasi Metode Klasifikasi SVM Pada Sentimen Ulasan Pengguna Aplikasi JKN Mobile,” SKANIKA: Sistem Komputer dan Teknik Informatika, vol. 8, no. 1, pp. 13–22, 2024.

A. Firizkiansah, A. Muhammad, and I. R. Maulana, “Optimasi Klasifikasi Data Teks Menggunakan Algoritma Logistic Regression dengan TF-IDF dan SMOTE,” 2025.

Andi Riswawan, “Implementing TF-IDF and Logistic Regression for Sentiment Analysis of YouTube Comments on the iPhone 16,” JURNAL TEKNOLOGI DAN OPEN SOURCE, vol. 7, no. 2, pp. 277–284, Dec. 2024, doi: 10.36378/jtos.v7i2.4753.

D. Purnamasari et al., “Pengantar Metode Analisis Sentimen,” 2023.

M. R. F. Rahmatullah, P. N. Andono, Affandy, and M. A. Soeleman, “Improving Random Forest Performance for Sentiment Analysis on Unbalanced Data Using SMOTE and BoW Integration: PLN Mobile Application Case Study,” Scientific Journal of Informatics, vol. 12, no. 1, pp. 1–10, Apr. 2025, doi: 10.15294/sji.v12i1.19295.

B. Belieffain, F. Daeli, and U. P. Sanjaya, “Comparative Analysis of Logistic Regression, Random Forest, and SVM for Asthma Risk Prediction Using Demographic, Clinical, and Environmental Features,” 2025. [Online]. Available: http://jurnal.polibatam.ac.id/index.php/JAIC

L. Geni, E. Yulianti, and D. I. Sensuse, “Sentiment Analysis of Tweets Before the 2024 Elections in Indonesia Using Bert Language Models,” Jurnal Ilmiah Teknik Elektro Komputer dan Informatika, vol. 9, no. 3, pp. 746–757, Aug. 2023, doi: 10.26555/jiteki.v9i3.26490.

M. Rahayu Ningsih, “Sentiment Analysis on SocialMedia Using TF-IDF Vectorization and H2O Gradient Boosting for Student Anxiety Detection,” Scientific Journal of Informatics, vol. 11, no. 4, 2024, doi: 10.15294/sji.v11i4.20582.

A. A. Rizal, S. R. Adawiyah, and A. M. Rafa, “Social Media dan Media Online Analytic Universitas Islam Negeri Mataram dengan Lexicon Based Method dan Latent Dirichlet Allocation,” JTIM : Jurnal Teknologi Informasi dan Multimedia, vol. 7, no. 2, pp. 305–325, Mar. 2025, doi: 10.35746/jtim.v7i2.620.

P. A. Sunarya, U. Rahardja, S. C. Chen, Y. M. Li, and M. Hardini, “Deciphering Digital Social Dynamics: A Comparative Study of Logistic Regression and Random Forest in Predicting E-Commerce Customer Behavior,” Journal of Applied Data Sciences, vol. 5, no. 1, pp. 100–113, Jan. 2024, doi: 10.47738/jads.v5i1.155.

D. A. Firdlous, R. Andrian, P. Sistem, D. T. Informasi, and K. Purwakarta, “Sentiment Analysis Public Twitter on 2024 Election using the Long Short Term Memory Model,” 2023. [Online]. Available: http://sistemasi.ftik.unisi.ac.id

S. Y. Kim, K. Ganesan, P. Dickens, and S. Panda, “Public sentiment toward solar energy—opinion mining of twitter using a transformer-based language model,” Sustainability (Switzerland), vol. 13, no. 5, pp. 1–19, Mar. 2021, doi: 10.3390/su13052673.

Additional Files

Published

2026-08-18

How to Cite

[1]
N. M. Al Ghazali and H. . Fakhrurroja, “Comparative Analysis of Logistic Regression and Random Forest with SMOTE for Sentiment Classification on Ethanol Policy in Indonesia”, J. Tek. Inform. (JUTIF), vol. 7, no. 4, pp. 3826–3840, Aug. 2026.