Analisis Sentimen Omnibus Law di Twitter dengan Machine Learning dan Teknik Resampling

Arif Dwi Syafutra, Kusrini Kusrini

Abstract


The Omnibus Law has been controversial in Indonesia since its enactment in 2020, sparking widespread public debate on social media platforms, particularly Twitter. This study aims to classify public sentiment toward the Omnibus Law using machine learning algorithms and resampling techniques to address data imbalance. Twenty thousand tweets were collected via web scraping, processed using Natural Language Processing (NLP) methods, and automatically labeled through a lexicon-based approach. The final dataset consisted of 17,184 tweets categorized into positive and negative sentiments. Sentiment classification models were developed using Support Vector Machine (SVM), Random Forest, and Multinomial Naïve Bayes, with Synthetic Minority Oversampling Technique (SMOTE) and Random Undersampling applied to enhance model performance. Evaluation results show that SVM combined with SMOTE achieved the highest performance with an accuracy of 93.08%, a recall of 92.85%, and a precision of 92.44%, outperforming other algorithms. These findings highlight that resampling techniques, particularly SMOTE, significantly improve classification performance in handling imbalanced datasets. This study emphasizes the importance of selecting appropriate algorithms and balancing strategies to enhance sentiment analysis accuracy based on social media data. Furthermore, the results open opportunities for future research to explore deep learning-based approaches for more complex public opinion analysis.

Omnibus Law telah menjadi isu kontroversial di Indonesia sejak pengesahannya pada tahun 2020 yang mendorong perdebatan luas di media sosial, khususnya Twitter. Penelitian ini bertujuan untuk mengklasifikasikan sentimen publik terhadap Omnibus Law menggunakan algoritma machine learning dan teknik resampling untuk mengatasi ketidakseimbangan data. Data sebanyak 20.000 tweet dikumpulkan melalui web scraping, diproses dengan metode Natural Language Processing (NLP), dan dilabeli secara otomatis menggunakan pendekatan berbasis lexicon. Dataset akhir terdiri atas 17.184 tweet dengan kategori sentimen positif dan negatif. Model klasifikasi dikembangkan menggunakan Support Vector Machine (SVM), Random Forest, dan Multinomial Naïve Bayes, dengan penerapan teknik Synthetic Minority Oversampling Technique (SMOTE) dan Random Undersampling untuk meningkatkan performa. Hasil evaluasi menunjukkan bahwa SVM dengan SMOTE menghasilkan akurasi tertinggi sebesar 93,08%, recall 92,85%, dan precision 92,44%, mengungguli algoritma lainnya. Temuan ini menunjukkan bahwa teknik resampling, khususnya SMOTE, secara signifikan memperbaiki performa klasifikasi dalam skenario data tidak seimbang. Penelitian ini menegaskan pentingnya kombinasi antara pemilihan algoritma yang tepat dan strategi balancing data untuk meningkatkan akurasi analisis sentimen berbasis media sosial. Studi ini juga membuka peluang penelitian lanjutan menggunakan pendekatan deep learning untuk klasifikasi opini publik yang lebih kompleks.


Keywords


Analisis Sentimen; Machine Learning; Omnibus Law; Teknik Resampling, Twitter

Full Text:

PDF

References


Andreas C. Müller, & Sarah Guido. (2016). Introduction to Machine Learning with Python : A GUIDE FOR DATA SCIENTISTS (Dawn Schanafelt, Ed.; 1st ed.). O’Reilly Media, Inc.

Azhari, M., Situmorang, Z., & Rosnelly, R. (2021). Perbandingan Akurasi, Recall, dan Presisi Klasifikasi pada Algoritma C4.5, Random Forest, SVM dan Naive Bayes. JURNAL MEDIA INFORMATIKA BUDIDARMA, 5(2), 640. https://doi.org/10.30865/mib.v5i2.2937

Gusti Naufhal Daffa Adnyana, I., Adams, F., & Windari Oktavia, A. (2021). Analisis Sentimen Terhadap Undang-Undang Cipta Kerja Menggunakan Metode Naïve Bayes. In Seminar Nasional Mahasiswa Ilmu Komputer dan Aplikasinya (SENAMIKA) Jakarta-Indonesia.

Huwaida, S. F., Kusumawati, R., & Isnaini, B. (2024). Analisis Sentimen Komentar YouTube terhadap Pemindahan Ibu Kota Negara Menggunakan Metode Naïve Bayes. Jambura Journal of Informatics, 6(1), 26–39. https://doi.org/10.37905/jji.v6i1.24718

Lee, R. S. T. (2024). Natural Language Processing. Springer Nature Singapore. https://doi.org/10.1007/978-981-99-1999-4

Makhtum, A. R., & Muhajir, M. (2023). SENTIMENT ANALYSIS OF OMNIBUS LAW USING SUPPORT VECTOR MACHINE (SVM) WITH LINEAR KERNEL. BAREKENG: Jurnal Ilmu Matematika Dan Terapan, 17(4), 2197–2206. https://doi.org/10.30598/barekengvol17iss4pp2197-2206

Pane, S. F., Owen, A., & Prianto, C. (2021). Analisis Sentimen UU Omnibus Law pada Twitter Menggunakan Metode Support Vector Machine. Jurnal Telekomunikasi Dan Komputer, 11(2), 130. https://doi.org/10.22441/incomtech.v11i2.10874

Sabrani, A., Gede Putu Wirarama Wedashwara, I. W., & Bimantoro, F. (2020). METODE MULTINOMIAL NAÏVE BAYES UNTUK KLASIFIKASI ARTIKEL ONLINE TENTANG GEMPA DI INDONESIA (Multinomial Naïve Bayes Method for Classification of Online Article About Earthquake in Indonesia). http://jtika.if.unram.ac.id/index.php/JTIKA/

Sucahyo, N., Kurniati, I., Harvit, K., Studi, P., Informasi, S., Teknologi, F., & Jakarta, S. (n.d.). SWADHARMA (JRIS) ANALISIS SENTIMEN MASYARAKAT TERHADAP UU CIPTA KERJA PADA MEDIA SOSIAL TWITTER.

Wang, Y., Guo, J., Yuan, C., & Li, B. (2022). Sentiment Analysis of Twitter Data. Applied Sciences (Switzerland), 12(22). https://doi.org/10.3390/app122211775

Wankhade, M., Rao, A. C. S., & Kulkarni, C. (2022). A survey on sentiment analysis methods, applications, and challenges. Artificial Intelligence Review, 55(7), 5731–5780. https://doi.org/10.1007/s10462-022-10144-1




DOI: https://doi.org/10.37905/jji.v1i1.30935

Refbacks




JJIhas been indexed by:
Sinta Crossref Scholar Garuda
Base Dimension ROAD SIS
ASCI







Editorial Office

Department of Informatics Engineering, Universitas Negeri Gorontalo
Engineering Faculty Building, 1st Floor
Jl. Prof. Dr. Ing. B. J. Habibie, Bone Bolango, Gorontalo, 96119, Indonesia. Whatsapp: +6281314270499 Email: jji.ft@ung.ac.id


Creative Commons Licence
Jambura Journal of Informatics (JJi), is licensed under a Lisensi Creative Commons Atribusi 4.0 Internasional.