Journal of Artificial Intelligence and Engineering Applications (JAIEA)
Vol. 5 No. 2 (2026): February 2026

Sentiment Analysis of Public Opinion on RUU KUHAP 2025 Using Multinomial Naïve Bayes and Random Oversampling

Muhammad Aqshal Anindya Tratama (Unknown)
Fadli Santoso Murmita (Unknown)
Dimas Arsya Maulana (Unknown)
Cindy Renata (Unknown)
Raras Ailsa (Unknown)



Article Info

Publish Date
15 Feb 2026

Abstract

The ratification of the Draft Criminal Procedure Code (RUU KUHAP) in 2025 has triggered a significant wave of public reaction on social media, particularly on YouTube. Understanding these public sentiments is crucial for evaluating the legislative performance of the House of Representatives (DPR). This study aims to classify public opinion into positive and negative sentiments using the Multinomial Naïve Bayes algorithm. The dataset consists of 2,370 user comments collected from YouTube. To address the chal lenge of unstructured text, a comprehensive pre - processing pipeline was implemented, including cleaning, normalization, and stemming. Furthermore, this research addresses the issue of class imbalance , where negative comments dominated (73.9%) by applying the Random Oversampling (ROS) technique to the training data. The feature extraction was performed using TF - IDF. The experimental results demonstrate that the proposed model achieved an overall Accuracy of 87.22%. Detailed evaluation shows a Pr ecision of 0.9 1 and Recall of 0.93 for the negative class, confirming the model's robustness. These findings indicate that the majority of public sentiment is critical of the RUU KUHAP , focusing on issues of corruption and trust. This research contributes to the field of text mining by demonstrating the effectiveness of oversampling in improving Naïve Bayes performance on imbalanced social media data.

Copyrights © 2026






Journal Info

Abbrev

JAIEA

Publisher

Subject

Automotive Engineering Computer Science & IT Control & Systems Engineering

Description

The Journal of Artificial Intelligence and Engineering Applications (JAIEA) is a peer-reviewed journal. The JAIEA welcomes papers on broad aspects of Artificial Intelligence and Engineering which is an always hot topic to study, but not limited to, cognition and AI applications, engineering ...