jics@kawanad.com Banda Aceh, Indonesia

Social Media X-Based Public Opinion Analysis of Prabowo-Gibran Government's First 100 Days Using Naïve Bayes and K-Nearest Neighbor Classification Methods

Ridha Afifah1* , Sugiyono2
1*,2 Sekolah Tinggi Ilmu Komputer Cipta Karya Informatika
* Corresponding Author: Ridha Afifah
Published
2025-11-30
Section
Article
Pages
213-222

Abstract

This study investigates public sentiment toward the first 100 days of the Prabowo–Gibran administration by analyzing opinions expressed on X (formerly Twitter) using machine learning approaches. A total of 431 valid tweets were collected, preprocessed, and manually labeled into positive and negative categories. The results reveal that 62% of public sentiment was negative, while 38% was positive, indicating widespread public criticism during the administration’s early period. Two algorithms, Naïve Bayes and K-Nearest Neighbor (KNN), were applied to classify sentiment. The Naïve Bayes model achieved superior performance, with an accuracy of 97.22%, compared to KNN’s 62.65%. The probabilistic nature of Naïve Bayes allowed it to manage high-dimensional, imbalanced textual data effectively, while KNN suffered from the “curse of dimensionality” and class bias. These findings demonstrate that Naïve Bayes remains a reliable and computationally efficient model for political sentiment analysis in the Indonesian digital context. Despite its strengths, this study acknowledges limitations in manual labeling and linguistic nuances such as sarcasm and irony. Future research is encouraged to integrate deep learning architectures like LSTM or BERT and adopt aspect-based sentiment analysis to capture more contextual insights from political discourse.

Article Usage Statistics

OJS Statistics
Share this article:

Author Biographies

Ridha Afifah Sekolah Tinggi Ilmu Komputer Cipta Karya Informatika

Informatics Engineering Study Program, Sekolah Tinggi Ilmu Komputer Cipta Karya Informatika, East Jakarta City, Special Capital Region of Jakarta, Indonesia.

Sugiyono Sekolah Tinggi Ilmu Komputer Cipta Karya Informatika

Informatics Engineering Study Program, Sekolah Tinggi Ilmu Komputer Cipta Karya Informatika, East Jakarta City, Special Capital Region of Jakarta, Indonesia.

How to Cite

Afifah, R., & Sugiyono. (2025). Social Media X-Based Public Opinion Analysis of Prabowo-Gibran Government’s First 100 Days Using Naïve Bayes and K-Nearest Neighbor Classification Methods. Journal Innovations Computer Science, 4(2), 213-222. https://doi.org/10.56347/jics.v4i2.316

License & Copyright

Copyright (c) 2025 Ridha Afifah, Sugiyono

This is an open-access journal. All articles are distributed under the terms of the Creative Commons Attribution 4.0 International License (CC BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Creative Commons Attribution 4.0 International (CC BY 4.0)

Under this license, you are free to:

  • Share: copy, distribute, and transmit the work in any medium or format.
  • Adapt: remix, transform, and build upon the work for any purpose, even commercially.

Attribution Requirements

You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

Copyright and Retention Copyright & Retention Authors retain copyright without restrictions and grant this journal the right of first publication under an open-access model. The journal retains non-exclusive publishing rights for archiving, indexing, and scholarly dissemination.

References

Total: 20 References
  • Al-Areef, M. H., & Saputra, S. K. (2023). Analisis sentimen pengguna Twitter mengenai calon presiden Indonesia tahun 2024 menggunakan algoritma LSTM. Jurnal SAINTIKOM, 22(1), 1–10.
  • Asro’i, A., & Februariyanti, H. (2022). Analisis sentimen pengguna Twitter terhadap perpanjangan PPKM menggunakan metode K-Nearest Neighbor. Jurnal Khatulistiwa Informatika, 10(1), 25–32.
  • Era, D., & Andryana, S. (2021). Perbandingan algoritma Naïve Bayes dan K-Nearest Neighbor pada analisis sentimen pembukaan pariwisata di masa pandemi COVID-19. Jurnal Sains Komputer & Informatika (J-SAKTI), 5(2), 856–865.
  • Hakim, Z. R., & Sugiyono. (2024). Analisa sentimen terhadap Kereta Cepat Jakarta–Bandung menggunakan algoritma Naïve Bayes dan K-Nearest Neighbor. Jurnal Sains dan Teknologi, 5(3), 1–10.
  • Hidayat, S. (2022). Analisa sentimen masyarakat Indonesia terhadap kinerja Prabowo Subianto sebagai anggota Kabinet Indonesia Maju di platform Twitter menggunakan R dengan algoritma Naïve Bayes. JUNIF: Jurnal Nasional Informatika, 3(1), 1–8.