Analyzing Public Sentiment on the Proposal to Return Regional Head Elections to DPRD on Platform X Using the C4.5 Algorithm
DOI:
https://doi.org/10.63158/journalisi.v8i2.1483Keywords:
C4.5 algorithm, sentiment analysis, political communication, social media X, TF-IDF, machine learning classificationAbstract
This study examines public sentiment among X users toward the proposal to return regional head elections (Pilkada) to an indirect electoral mechanism through the Regional People’s Representative Council (DPRD), using a decision-tree classifier based on the C4.5 approach. A dataset of 4,127 tweets collected via X API v2 between December 2024 and January 2026 was analyzed using a seven-stage text preprocessing pipeline. Sentiment labels were generated through a hybrid lexicon-based approach, followed by manual verification of 500 stratified tweets by two independent annotators, yielding substantial inter-annotator agreement (Cohen’s Kappa = 0.78). TF-IDF was used for feature extraction, and the dataset was divided using an 80:20 stratified train-test split. The classifier achieved 81% accuracy, 82% precision, 79% recall, and an F1-score of 80%, outperforming Naive Bayes (74%) and Support Vector Machine (79%) baselines on the same dataset. The sentiment distribution showed that 45% of tweets were negative, 32% were positive, and 23% were neutral, indicating a predominantly critical response among X users toward the proposal. These findings describe discourse on X during the study period and should not be interpreted as representative of broader public opinion. Overall, the study highlights the potential of machine learning methods for analyzing Indonesian political discourse on social media.
Downloads
References
[1] R. Lubis, N. R. Yunus, R. Herlina, and A. P. Shapiulayyevna, “Political law means that the election of regional heads is democratically elected: Politik hukum memaknai pemilihan kepala daerah dipilih secara demokratis,” DJL, vol. 1, no. 1, pp. 65–79, Mar. 2025, doi: 10.64344/djl.v1i1.17.
[2] A. Gyarani, J. Rifqi, and A. Putranto, “Peranan komunikasi publik pada partai pengusung Pilkada 2024 Kabupaten Bogor (studi terhadap pasangan No. 1 Rudy Susmanto dan Ade Ruhandi),” JIMIK, vol. 6, no. 1, pp. 706–718, Jan. 2025, doi: 10.35870/jimik.v6i1.1296.
[3] Indonesia Corruption Watch, “Demokrasi tidak boleh ditarik mundur: Tolak wacana pengembalian Pilkada oleh DPRD!,” Dec. 30, 2025. [Online]. Available: https://antikorupsi.org
[4] R. Riyanti, “Maintaining direct regional head elections, solutions or challenges?,” JOG Untirta, vol. 7, no. 3, Sep. 2022, doi: 10.31506/jog.v7i3.16325.
[5] T. Hidayat and L. Fitrianingrum, “Election of regional head based on hierarchy: Strengthening argumentation of the discussion of abolishing direct elections in Indonesia and proposed models,” CLS, vol. 1, no. 2, pp. 140–152, Sep. 2022, doi: 10.36448/cls.v1i2.27.
[6] Tempo, “Survei: Mayoritas pemilih Prabowo tolak Pilkada lewat DPRD,” Dec. 30, 2025. [Online]. Available: https://www.tempo.co
[7] F. Panjaitan, W. Ce, H. Oktafiandi, G. Kanugrahan, Y. Ramdhani, and V. H. C. Putra, “Evaluation of machine learning models for sentiment analysis in the South Sumatra governor election using data balancing techniques,” JournalISI, vol. 7, no. 1, pp. 461–478, Mar. 2025, doi: 10.51519/journalisi.v7i1.1019.
[8] Moch. R. K. Muhaemin, Fitriyani, and L. S. Darfiansa, “Analysis of public sentiment regarding the 2024 Jakarta election on platform X using deep learning,” IJOICT, vol. 11, no. 1, pp. 13–25, Jun. 2025, doi: 10.21108/ijoict.v11i1.9176.
[9] R. Hidayat, A. B. Hakim, and R. Nugraha, “Perbandingan metode Naïve Bayes dan decision tree C4.5 untuk analisis sentimen produk Es Teh Indonesia di media sosial Twitter,” SISKOM-KB, vol. 7, no. 2, pp. 88–98, Mar. 2024, doi: 10.47970/siskom-kb.v7i1.537.
[10] A. Rahmayanti, L. Rusdiana, and S. Suratno, “Perbandingan metode algoritma C4.5 dan Naïve Bayes untuk memprediksi kelulusan mahasiswa,” Walisongo J. Inf. Technol., vol. 4, no. 1, pp. 11–22, Aug. 2022, doi: 10.21580/wjit.2022.4.1.9654.
[11] A. S. Hanin and M. Maryam, “Sentiment analysis of Twitter towards the free lunch program using the C4.5 algorithm,” Int. J. Adv. Data Inf. Syst., vol. 6, no. 1, pp. 31–45, Apr. 2025, doi: 10.59395/ijadis.v6i1.1357.
[12] S. Puad, G. Garno, and A. Susilo Yuda Irawan, “Analisis sentimen masyarakat pada Twitter terhadap pemilihan umum 2024 menggunakan algoritma Naïve Bayes,” JATI, vol. 7, no. 3, pp. 1560–1566, Oct. 2023, doi: 10.36040/jati.v7i3.6920.
[13] T. N. Wijaya, R. Indriati, and M. N. Muzaki, “Analisis sentimen opini publik tentang undang-undang Cipta Kerja pada Twitter,” JJEEE, vol. 3, no. 2, pp. 78–83, Jul. 2021, doi: 10.37905/jjeee.v3i2.10885.
[14] N. Nabiilah, S. Rohimah, and S. K. P. Loka, “Analyzing customer sentiment towards marketplace reviews using classification algorithms,” Int. J. Adv. Technol. Inf. Sci., vol. 2, no. 1, pp. 23–30, Feb. 2025, doi: 10.57152/ijatis.v2i1.1774.
[15] V. C. Storey and D. E. O’Leary, “Text analysis of evolving emotions and sentiments in COVID-19 Twitter communication,” Cogn. Comput., vol. 16, no. 4, pp. 1834–1857, Jul. 2024, doi: 10.1007/s12559-022-10025-3.
[16] S. Khairunnisa, A. Adiwijaya, and S. A. Faraby, “Pengaruh text preprocessing terhadap analisis sentimen komentar masyarakat pada media sosial Twitter (studi kasus pandemi COVID-19),” MIB, vol. 5, no. 2, p. 406, Apr. 2021, doi: 10.30865/mib.v5i2.2835.
[17] Y. Qi and Z. Shabrina, “Sentiment analysis using Twitter data: A comparative application of lexicon- and machine-learning-based approach,” Soc. Netw. Anal. Min., vol. 13, no. 1, p. 31, Feb. 2023, doi: 10.1007/s13278-023-01030-x.
[18] M. Hayaty and A. H. Pratama, “Performance of lexical resource and manual labeling on long short-term memory model for text classification,” J. Ilm. Tek. Elektro Komput. Dan Inform., vol. 9, no. 1, pp. 74–84, Feb. 2023, doi: 10.26555/jiteki.v9i1.25375.
[19] M. Raees and S. Fazilat, “Lexicon-based sentiment analysis on text polarities with evaluation of classification models,” arXiv, 2024, doi: 10.48550/ARXIV.2409.12840.
[20] M. Das, S. K., and P. J. A. Alphonse, “A comparative study on TF-IDF feature weighting method and its analysis using unstructured dataset,” arXiv, 2023, doi: 10.48550/ARXIV.2308.04037.
[21] I. Y. Kairupan, A. Angdresey, and H. Arif, “An extreme gradient boosting approach for classification and sentiment analysis,” AJTM, vol. 16, no. 3, pp. 211–225, 2023, doi: 10.12695/ajtm.2023.16.3.5.
[22] Y. Diao and Q. Zhang, “Optimization of management mode of small- and medium-sized enterprises based on decision tree model,” J. Math., vol. 2021, pp. 1–9, Dec. 2021, doi: 10.1155/2021/2815086.
[23] O. Rainio, J. Teuho, and R. Klén, “Evaluation metrics and statistical tests for machine learning,” Sci. Rep., vol. 14, no. 1, p. 6086, Mar. 2024, doi: 10.1038/s41598-024-56706-x.
[24] K. Md. S. Hasan, S. Saha, M. S. Mehrab, Nipa, T. Islam, and A. Salam, “Data analysis using visualization techniques,” in Proc. 2025 Int. Conf. Electr., Comput. Commun. Eng. (ECCE), Chittagong, Bangladesh, Feb. 2025, pp. 1–6, doi: 10.1109/ECCE64574.2025.11013513.
[25] A. Lavanya, S. Sindhuja, L. Gaurav, and W. Ali, “A comprehensive review of data visualization tools: Features, strengths, and weaknesses,” Int. J. Comput. Eng. Res. Trends, vol. 10, no. 1, pp. 10–20, Jan. 2023, doi: 10.22362/ijcert/2023/v10/i01/v10i0102.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Journal of Information Systems and Informatics

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors Declaration
- The Authors certify that they have read, understood, and agreed to the Journal of Information Systems and Informatics (JournalISI) submission guidelines, policies, and submission declaration. The submission has been prepared using the provided template.
- The Authors certify that all authors have approved the publication of this manuscript and that there is no conflict of interest.
- The Authors confirm that the manuscript is their original work, has not received prior publication, is not under consideration for publication elsewhere, and has not been previously published.
- The Authors confirm that all authors listed on the title page have contributed significantly to the work, have read the manuscript, attest to the validity and legitimacy of the data and its interpretation, and agree to its submission.
- The Authors confirm that the manuscript is not copied from or plagiarized from any other published work.
- The Authors declare that the manuscript will not be submitted for publication in any other journal or magazine until a decision is made by the journal editors.
- If the manuscript is finally accepted for publication, the Authors confirm that they will either proceed with publication immediately or withdraw the manuscript in accordance with the journal’s withdrawal policies.
- The Authors agree that, upon publication of the manuscript in this journal, they transfer copyright or assign exclusive rights to the publisher, including commercial rights














