Analyzing Public Sentiment on the Proposal to Return Regional Head Elections to DPRD on Platform X Using the C4.5 Algorithm

Authors

  • Ade Novia Maulana Universitas Islam Negeri Sulthan Thaha Saifuddin Jambi, Indonesia
  • Wan Moh Yusoff bin Wan Yaacob Politeknik Tuanku Syed Sirajuddin, Malaysia
  • Fatima Felawati Universitas Islam Negeri Sulthan Thaha Saifuddin Jambi, Indonesia
Pages Icon

DOI:

https://doi.org/10.63158/journalisi.v8i2.1483

Keywords:

C4.5 algorithm, sentiment analysis, political communication, social media X, TF-IDF, machine learning classification

Abstract

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

Download data is not yet available.

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

2026-04-12

Issue

Section

Articles

How to Cite

[1]
A. N. Maulana, W. M. Y. bin Wan Yaacob, and F. Felawati, “Analyzing Public Sentiment on the Proposal to Return Regional Head Elections to DPRD on Platform X Using the C4.5 Algorithm”, journalisi, vol. 8, no. 2, pp. 1433–1450, Apr. 2026, doi: 10.63158/journalisi.v8i2.1483.