Sentiment Analysis of the 2022 Fuel Price Hike Using the Naïve Bayes Classifier

Alia Lestari, Muhammad Hajarul Aswad, Subekti Masri

Abstract


This study examines public opinion towards Indonesia’s 2022 fuel price hike using social media analytics and assesses the pace of a supervised machine learning classifier for policy-oriented sentiment analysis. The research aimed to answer the following two questions (1) What was the prevailing public sentiment articulated on Twitter after fuel pricing announcement? and (2) How well is a Naïve Bayes classifier able to classify sentiment polarity in this domain? We employed a quantitative cross-sectional design utilizing Twitter data obtained from 3–4 September 2022 via the hashtags #hargabbm and #bbmnaik. Ultimately, after preprocessing, there were 1,867 unique tweets out of the 2,003 retrieved ones. Training data consisted of a total of 489 manually labeled tweets, and 1,378 for testing. Tokenization and TF–IDF weighting were performed on text data, while the sentiment classification was done using Gaussian Naïve Bayes model and evaluated through confusion matrix metrics. The results suggest that public sentiment was overwhelmingly negative during the analysis period and that the classifier reached an accuracy of 94.89% with a precision of 73.40%, recall of 100%, and F1-score of 84.66. These findings show that probabilistic text classification offers newsworthy evidence about whether the public unanimously supports economically sensitive policies (or not), with voltage and salience meaningfully specified.


Keywords


Energy policy; Naïve Bayes classifier; Sentiment analysis; TF–IDF; Twitter

Full Text:

PDF

References


K. Kpodar and B. Liu, “The distributional implications of the impact of fuel price increases on inflation,” Energy Econ., vol. 108, p. 105909, Apr. 2022, doi: 10.1016/J.ENECO.2022.105909.

A. Drabo, “Social Unrests and Fuel Prices: The Role of Macroeconomic, Social and Institutional Factors,” IMF Working Papers, vol. 2023, no. 228, p. 1, Oct. 2023, doi: 10.5089/9798400257384.001.

[

F. Jawadi, D. Bourghelle, P. Rozin, A. I. Cheffou, and G. S. Uddin, “Sentiment and energy price volatility: A nonlinear high frequency analysis,” Energy Econ., vol. 133, p. 107465, May 2024, doi: 10.1016/J.ENECO.2024.107465.

[

S. Saha, “Asymmetric Impact of Oil Price Changes on Stock Prices: Evidence from Country and Sectoral Level Data,” Journal of Economics and Finance, vol. 46, no. 2, pp. 237–282, Apr. 2022, doi: 10.1007/S12197-021-09559-3.

[

C. Couharde and S. Mouhoud, “Fossil Fuel Subsidies, Income Inequality, And Poverty: Evidence From Developing Countries,” J. Econ. Surv., vol. 34, no. 5, pp. 981–1006, Dec. 2020, doi: 10.1111/JOES.12384.

I. Stupak, M. Mansoor, and C. T. Smith, “Conceptual framework for increasing legitimacy and trust of sustainability governance,” Energy, Sustainability and Society 2021 11:1, vol. 11, no. 1, pp. 5-, Mar. 2021, doi: 10.1186/S13705-021-00280-X.

M. R. Jazuli, K. Roll, and Y. Mulugetta, “A discourse analysis of fuel subsidy reduction: revisiting the political economy of Indonesia’s experiences 1998–2019,” Humanities and Social Sciences Communications 2025 13:1, vol. 13, no. 1, pp. 47-, Dec. 2025, doi: 10.1057/s41599-025-06342-1.

D. Abbonato, “Public sentiments on the fourth industrial revolution: An unsolicited public opinion poll from Twitter,” Nov. 2024, Accessed: Feb. 25, 2026. [Online]. Available: https://arxiv.org/abs/2411.14230v2

X. Ning, R. Li, D. Lan, C. Chen, and Y. Li, “Public sentiment dynamics in policy transitions: a sentiment analysis based on Weibo data,” Front. Public Health, vol. 13, p. 1692166, Oct. 2025, doi: 10.3389/FPUBH.2025.1692166/TEXT.

G. Wang, Y. Liu, and S. Tu, “Discursive use of stability in New York Times’ coverage of China: a sentiment analysis approach,” Humanities and Social Sciences Communications 2023 10:1, vol. 10, no. 1, pp. 666-, Oct. 2023, doi: 10.1057/s41599-023-02165-0.

B. N. Nguyen, “A sentiment-based approach to predict energy price volatility using distilRoBERTa and GARCH models,” Energy Econ., vol. 149, Sep. 2025, doi: 10.1016/j.eneco.2025.108646.

P. Deniz and T. Stengos, “Electricity prices through the lens of sentiments for the UN and the IMF: An asymmetric approach for Türkiye,” Borsa Istanbul Review, vol. 25, no. 4, pp. 756–769, Jul. 2025, doi: 10.1016/j.bir.2025.03.008.

[

A. Priadana and A. A. Rizal, “Sentiment Analysis on Government Performance in Tourism During The COVID-19 Pandemic Period With Lexicon Based,” CAUCHY: Jurnal Matematika Murni dan Aplikasi, vol. 7, no. 1, pp. 28–39, Nov. 2021, doi: 10.18860/CA.V7I1.12488.

B. Agarwal and N. Mittal, “Machine Learning Approaches for Sentiment Analysis,” Data Mining and Analysis in the Engineering Field, pp. 193–208, May 2014, doi: 10.4018/978-1-4666-6086-1.CH011.

[

N. V. Patel and H. Chhinkaniwala, “Investigating Machine Learning Techniques for User Sentiment Analysis,” International Journal of Decision Support System Technology, vol. 11, no. 3, pp. 1–12, 2019, doi: 10.4018/IJDSST.2019070101.

[

M. Reusens et al., “Evaluating text classification: A benchmark study,” Expert Syst. Appl., vol. 254, p. 124302, Nov. 2024, doi: 10.1016/J.ESWA.2024.124302.

K. P. . Murphy, “Machine learning : a probabilistic perspective,” p. 1067, 2012.

[

K. M. Ting, “Confusion Matrix,” Encyclopedia of Machine Learning, pp. 209–209, 2011, doi: 10.1007/978-0-387-30164-8_157.

[

S. J. Zawadzki, L. Vrieling, and E. van der Werff, “What influences public acceptability of sustainable energy policies? The crucial role of funding and who benefits,” Energy Res. Soc. Sci., vol. 87, p. 102468, May 2022, doi: 10.1016/J.ERSS.2021.102468.

I. Stadelmann-Steffen and C. Eder, “Public opinion in policy contexts. A comparative analysis of domestic energy policies and individual policy preferences in Europe,” International Political Science Review, vol. 42, no. 1, pp. 78–94, Jan. 2021, doi: 10.1177/0192512120913047/suppl_file/supplementary_material_for_public_opinion_in_policy_context.pdf.

“Effective Comparative Evaluation Of Sentiment Analysis Using Paired T-Test: A Performance Study Of Supervised Methods,” Journal of Southwest Jiaotong University, vol. 58, no. 5, 2023, doi: 10.35741/ISSN.0258-2724.58.5.28.

D. C. Gkikas and P. K. Theodoridis, “Predicting Online Shopping Behavior: Using Machine Learning and Google Analytics to Classify User Engagement,” Applied Sciences 2024, Vol. 14, vol. 14, no. 23, Dec. 2024, doi: 10.3390/APP142311403.

Y. C. Lin, S. A. Chen, J. J. Liu, and C. J. Lin, “Linear Classifier: An Often-Forgotten Baseline for Text Classification,” Proceedings of the Annual Meeting of the Association for Computational Linguistics, vol. 2, pp. 1876–1888, Jun. 2023, doi: 10.18653/v1/2023.acl-short.160.

C. Chen et al., “Cross-Platform Violence Detection on Social Media: A Dataset and Analysis,” pp. 494–498, May 2025, doi: 10.1145/3717867.3717877.




DOI: https://doi.org/10.18860/cauchy.v11i1.36473

Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Alia Lestari, Muhammad Hajarul Aswad, Subekti Masri

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Editorial Office
Mathematics Department,
Universitas Islam Negeri Maulana Malik Ibrahim Malang
Gajayana Street 50 Malang, East Java, Indonesia 65144
Faximile (+62) 341 558933
e-mail: cauchy@uin-malang.ac.id

Creative Commons License
CAUCHY: Jurnal Matematika Murni dan Aplikasi is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.