Teknika
Vol. 15 No. 1 (2026): March 2026

Implementation of Random Forest Algorithm with Random Oversampling for Sentiment Analysis of X Users Toward the Sekolah Rakyat Program

Deni Agus Hendrawan (Information System, Faculty of Computer, Sriwijaya University, Palembang, South Sumatera, Indonesia)
Ali Ibrahim (Master of Computer Science, Faculty of Computer, Sriwijaya University, Palembang, South Sumatera, Indonesia)
Yadi Utama (Information System, Faculty of Computer, Sriwijaya University, Palembang, South Sumatera, Indonesia)
Endang Lestari Ruskan (Computer System, Faculty of Computer, Sriwijaya University, Palembang, South Sumatera, Indonesia)
Fathoni (Information System, Faculty of Computer, Sriwijaya University, Palembang, South Sumatera, Indonesia)



Article Info

Publish Date
31 Mar 2026

Abstract

Social media site X has emerged as a significant platform for voicing public views on government initiatives, such as the Sekolah Rakyat Program. Nevertheless, utilizing social media information for sentiment analysis often faces challenges due to class imbalance, which may result in skewed predictions from models. This research seeks to examine public sentiment and assess how well the Random Forest algorithm performs when paired with Term Frequency–Inverse Document Frequency (TF-IDF) feature extraction and Random Oversampling (ROS) methods to mitigate class imbalance. A dataset comprising 8,623 tweets was gathered and split into training and testing sets using an 80:20 ratio. The results of the experiments indicate that the suggested method demonstrates robust and realistic classification performance, achieving an accuracy of 80.99%, along with a weighted average score in precision, recall, and F1-score of 0.81. Additionally, the sentiment analysis indicates that the majority of public opinions are largely positive, with roughly 69.4% of the testing data reflecting a favorable outlook toward free education access and school improvement efforts. These findings suggest that the proposed model provides reliable performance in capturing public sentiment patterns.

Copyrights © 2026






Journal Info

Abbrev

teknika

Publisher

Subject

Computer Science & IT Electrical & Electronics Engineering Engineering

Description

Teknika is a peer-reviewed journal dedicated to disseminate research articles in Information and Communication Technology (ICT) area. Researchers, lecturers, students, or practitioners are welcomed to submit paper which has topic below: Computer Networks Computer Security Artificial Intelligence ...