Analisis Sentimen Komentar YouTube terhadap Kenaikan Tunjangan DPR RI menggunakan Naïve Bayes, SVM, dan Random Forest


  • Jemmi Rama Dani * Mail Universitas Teknokrat Indonesia, Bandar Lampung, Indonesia
  • Parjito Parjito Universitas Teknokrat Indonesia, Bandar Lampung, Indonesia
  • (*) Corresponding Author
Keywords: Sentiment Analysis; DPR RI; YouTube; Support Vector Machine; Naïve Bayes; SMOTE

Abstract

The rise of digital technology encourages the public to actively voice their opinions through social media, including in response to political issues such as the policy on increasing the remuneration of the Indonesian House of Representatives (DPR RI). This research aims to analyze public sentiment towards this issue on the YouTube platform using a comparative approach with three Machine Learning algorithms: Naïve Bayes, Support Vector Machine, and Random Forest. The data was acquired from viewer comments via the YouTube Data Application Programming Interface (API), totaling 78,866 lines of comments collected from seven videos discussing the DPR RI controversy. The data collection process utilized the googleapiclient.discovery.build module with API version V3, where the API_Key served as the authentication key to access data from YouTube. The research stages included preprocessing for data cleaning, sentiment labeling based on the InSet Lexicon Based method, and the application of the Synthetic Minority Over-sampling Technique (SMOTE) to address class imbalance in the data. The results show that before SMOTE application, the Support Vector Machine (SVM) model achieved the highest accuracy of 89%, followed by Random Forest at 81%, and Naïve Bayes at 62%. After applying SMOTE, the performance of all three models increased significantly, with SVM obtaining the highest accuracy of 93%, followed by Random Forest at 86%, and Naïve Bayes at 75%. For the positive class, SVM also demonstrated the best performance with a Precision value of 96%, Recall of 95%, and an F1-Score of 95%. Overall, the findings of this study confirm that SVM is superior in maintaining class balance in classification, both before and after SMOTE. The Machine Learning-based sentiment analysis approach is proven capable of providing a comprehensive overview of public opinion on political issues, while also offering important input for policymakers in formulating more transparent and responsive communication strategies.

Downloads

Download data is not yet available.

References

A. D. Putra, A. S. R. Wulandari, And A. Arief, “Indonesian Political Dynamics In National And Regional Elections,” Amsir Law Journal, Vol. 6, No. 1, Pp. 28–39, Oct. 2024, Doi: 10.36746/Alj.V6i1.595.

A. Setiawan, S. M. Sari, And N. Rahmah, “Lembaga Negara Pemegang Kekuasaan Legislatif,” Jurnal Hukum Dan Kewarganegaraan, Vol. 15, 2025, Doi: 10.3783/Causa.V2i9.2461.

J. Hukum And C. Justitia, “Analisis Hak Recall Partai Politik Terhadap Anggota Dewan Perwakilan Rakyat,” Jurnal Hukum Caraka Justitia, Vol. 5, No. 1, Pp. 43–54, 2025, Doi: Https://Doi.Org/10.30588/Jhcj.V5i1.2192.

Anak Teknik Indonesia, “Isu Kenaikan Gaji Dpr Ri Tahun 2025: Klarifikasi, Kontroversi, Dan Tuntutan Transparansi,” Https://Www.Anakteknik.Co.Id/. Accessed: Sep. 24, 2025. [Online]. Available: Https://Www.Anakteknik.Co.Id/Araa_Fii/Articles/Isu-Kenaikan-Gaji-Dpr-Ri-Tahun-2025-Klarifikasi-Kontroversi-Dan-Tuntutan-Transparansi?Srsltid=Afmboordzr15ukgntmbejokqdsbeiqn-Xytrdkmzhwdu0lblaalp01qh&

B. Wicaksono And V. R. S. Nastiti, “Analisis Sentimen Dalam Opini Publik Di Chanel Youtube Indonesia Lawyers Club Tentang Isu Populer Dengan Menggunakan Metode Lstm Dan Bi-Lstm,” Jurnal Algoritma, Vol. 21, No. 2, Pp. 241–251, Dec. 2024, Doi: 10.33364/Algoritma/V.21-2.1696.

A. Sudiongko, “8 Negara Dengan Jumlah Pemakai Youtube Terbanyak Di Dunia,” Madiun.Jatimtimes.Com. Accessed: Sep. 24, 2025. [Online]. Available: Https://Madiun.Jatimtimes.Com/Baca/284336/20230224/072500/8-Negara-Dengan-Jumlah-Pemakai-Youtube-Terbanyak-Di-Dunia

I. Koswara, “Global Komunika Diskursus Digital Dan Suara Publik: Komentar Youtube Dalam Kasus #Indonesiagelap,” Global Komunika, Vol. 8, No. 2, 2025.

M. Bais, A. Hakiki, And Y. Darmi, “Penerapan Algoritma Machine Learning Svm Dan Nbc Pada Sentimen Analisis Komentar Youtube Program Pengaduan Masyarakat Lapor Mas Wapres,” Jim: Jurnal Multidisiplin, Vol. 4, No. 1, 2025, Doi: 10.38035/Jim.V4i1.

T. Putri, Siti Nurhaliza, And Dodi Vionanda, “Analisis Sentimen Penggunaan Aplikasi Youtube Menggunakan Metode Naïve Bayes,” Unp Journal Of Statistics And Data Science, Vol. 3, No. 1, Pp. 60–66, Feb. 2025, Doi: 10.24036/Ujsds/Vol3-Iss1/343.

A. R. Andriawan, M. Mustakim, And R. Novita, “Sentiment Analysis Classification Of Political Parties On Twitter Using Gated Recurrent Unit Algorithm And Natural Language Processing,” Journal Of Informatics And Telecommunication Engineering, Vol. 7, No. 2, Pp. 514–522, Jan. 2024, Doi: 10.31289/Jite.V7i2.10709.

M. Jamil, H. Hadiyanto, And R. Sanjaya, “Sentiment Analysis: Classifying Public Comments On Youtube In Disaster Management Simulation In Indonesia Using Naïve Bayes And Support Vector Machine,” Ingenierie Des Systemes D’information, Vol. 29, No. 2, Pp. 437–446, Apr. 2024, Doi: 10.18280/Isi.290205.

U. Krishna, “Youtube Comments Sentiments Analysis,” Int J Res Appl Sci Eng Technol, Vol. 13, No. 1, Pp. 875–880, Jan. 2025, Doi: 10.22214/Ijraset.2025.66475.

S. K. Dirjen, P. Riset, D. Pengembangan, R. Dikti, S. Khomsah, And A. S. Aribowo, “Terakreditasi Sinta Peringkat 2 Model Text-Preprocessing Komentar Youtube Dalam Bahasa Indonesia,” Iaii, Vol. 1, No. 3, Pp. 648–654, 2017, Doi: Https://Doi.Org/10.29207/Resti.V4i4.2035.

H. Ali And N. Hendrastuty, “Comparison Of Naïve Bayes Classifier, Support Vector Machine, Random Forest Algorithms For Public Sentiment Analysis Of Kip-K Program On Twitter,” Jurnal Teknik Informatika (Jutif), Vol. 5, No. 6, Pp. 1701–1712, Dec. 2024, Doi: 10.52436/1.Jutif.2024.5.6.4030.

F. Aldi Wijaya And Parjito, “Analisis Sentimen Publik Terhadap Virus Hmpv Berdasarkan Media Sosial X Dengan Algoritma Logistic Regression,” Building Of Informatics, Technology And Science (Bits), 2025, Doi: 10.47065/Bits.V9i9.999.

S. Al Afif And R. R. Suryono, “Analisis Sentiment Publik Terhadap Deepfake Ai Menggunakan Aplikasi X Dengan Metode Support Vector Mechine Dan Naive Bayes Classifier,” Building Of Informatics, Technology And Science (Bits), 2025, Doi: 10.47065/Bits.V9i9.999.

L. Kencono And D. Darwis, “Perbandingan Algoritma Nbc, Svm Dan Random Forest Untuk Analisis Sentimen Implementasi Starlink Pada Media Sosial X,” Technology And Science (Bits), Vol. 6, No. 4, 2025, Doi: 10.47065/Bits.V6i4.6813.

S. F. Huwaida, R. Kusumawati, And B. Isnaini, “Analisis Sentimen Komentar Youtube Terhadap Pemindahan Ibu Kota Negara Menggunakan Metode Naïve Bayes,” Jambura Journal Of Informatics, Vol. 6, No. 1, Pp. 26–39, Apr. 2024, Doi: 10.37905/Jji.V6i1.24718.

M. Fernanda And N. Fathoni, “Perbandingan Performa Labeling Lexicon Inset Dan Vader Pada Analisa Sentimen Rohingya Di Aplikasi X Dengan Svm,” Jurnal Informatika Dan Sains Teknologi, Vol. 1, No. 3, Pp. 62–76, 2024, Doi: 10.62951/Modem.V1i3.112.

T. Chamidy, “Application Of Smote In Sentiment Analysis Of Myxl User Reviews On Google Play Store,” Jurnal Informatika Sunan Kalijaga), Vol. 10, No. 1, Pp. 74–86, 2025, Doi: Https://Doi.Org/10.14421/Jiska.2025.10.1.74-86.

D. Sugiarto, E. Utami, And A. Yaqin, “Perbandingan Kinerja Model Tf-Idf Dan Bow Untuk Klasifikasi Opini Publik Tentang Kebijakan Blt Minyak Goreng,” Jti, Dec. 2022, Doi: Https://Doi.Org/10.25105/Jti.V12i3.15669.

T. Arya Bimantoro, Y. Rahmawati, Y. Findawati, And M. A. Rosid, “Sentiment Analysis Of Youtube Comments On The East Java Grant Case Using The Support Vector Machine (Svm) Algorithm. [Analisis Sentimen Komentar Youtube Terhadap Kasus Dana Hibah Jawa Timur Menggunakan Algoritma Support Vector Machine (Svm)],” Department Of Informatics Engineering, 2025, Doi: Https://Doi.Org/10.21070/Ups.9030.

F. Fatma Wati, A. Eko Widodo, And P. Korespondensi, “Analisis Sentimen Ulasan Pengguna Aplikasi Deepseek Menggunakan Algoritma Random Forest Dan Naive Bayes,” Computer And Network Technology, Vol. 5, No. 1, Pp. 8–15, 2025, Doi: Https://Doi.Org/10.31294/Hqpha267.

M. Bais, A. Hakiki, And Y. Darmi, “Penerapan Algoritma Machine Learning Svm Dan Nbc Pada Sentimen Analisis Komentar Youtube Program Pengaduan Masyarakat Lapor Mas Wapres,” Jim: Jurnal Ilmu Multidisiplin, Vol. 4, No. 1, 2025, Doi: 10.38035/Jim.V4i1.

T. Cahya Herdiyani And A. U. Zailani, “Sentiment Analysis Terkait Pemindahan Ibu Kota Indonesia Menggunakan Metode Random Forest Berdasarkan Tweet Warga Negara Indonesia Sentiment Analysis Related To Transportation Of Indonesian Capital City Using Random Forest Method Based On Tweet Of Indonesian Citizens,” Jtsi, Vol. 3, No. 2, Pp. 154–165, 2022, Doi: Https://Doi.Org/10.35957/Jtsi.V3i2.2920.

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,” Journal Of Information Systems And Informatics, Vol. 7, No. 1, Pp. 461–478, Mar. 2025, Doi: 10.51519/Journalisi.V7i1.1019


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Analisis Sentimen Komentar YouTube terhadap Kenaikan Tunjangan DPR RI menggunakan Naïve Bayes, SVM, dan Random Forest

Dimensions Badge
Article History
Submitted: 2025-10-11
Published: 2025-12-08
Abstract View: 61 times
PDF Download: 37 times
How to Cite
Dani, J., & Parjito, P. (2025). Analisis Sentimen Komentar YouTube terhadap Kenaikan Tunjangan DPR RI menggunakan Naïve Bayes, SVM, dan Random Forest. Building of Informatics, Technology and Science (BITS), 7(3), 1512-1524. https://doi.org/10.47065/bits.v7i3.8513
Issue
Section
Articles