Sinkron : Jurnal dan Penelitian Teknik Informatika
Vol. 10 No. 3 (2026): Article Research July 2026

Implementing Random Forest for Eye State Detection in an EEG-Based Brain-Computer Interface System

Muhammad Alfathan (Informatics Engineering, Faculty of Information Technology, ISB Atma luhur)
Tri Sugihartono (Informatics Engineering, Faculty of Information Technology, ISB Atma luhur)



Article Info

Publish Date
20 Jul 2026

Abstract

Eye state detection using Electroencephalogram (EEG) signals is a growing research area in Brain-Computer Interface (BCI) systems, with practical implications for drowsiness monitoring and assistive technologies. However, EEG signals are highly susceptible to extreme outliers caused by muscle artifacts and electrode interference, which significantly degrade model performance when left unaddressed. Previous studies have largely overlooked explicit outlier handling strategies and often rely solely on accuracy as the evaluation metric, which is insufficient for imbalanced class distributions. This study aims to implement the Interquartile Range (IQR) Clipping method for outlier handling on EEG signals and develop a Random Forest classification model to distinguish open-eye and closed-eye states, evaluated through seven comprehensive metrics. The EEG-Eye-State dataset from the UCI Machine Learning Repository, consisting of 14,980 samples across 14 EEG sensor features, was used. IQR Clipping with bounds [Q1 − 1.5×IQR, Q3 + 1.5×IQR] was applied to all sensors, followed by StandardScaler normalization and an 80:20 Stratified Train-Test Split. A Random Forest model with 100 estimators and balanced class weights was trained and validated using Stratified 10-Fold Cross-Validation. IQR Clipping successfully handled 12,737 outlier instances across all sensors without discarding any samples. The model achieved an accuracy of 92.49%, Balanced Accuracy of 92.14%, ROC-AUC of 0.9791, PR-AUC of 0.9759, F1-Score Macro of 0.9236, Matthews Correlation Coefficient (MCC) of 0.8486, and Cohen Kappa of 0.8474. Cross-validation confirmed model stability with a mean accuracy of 92.86% ± 0.36% and ROC-AUC of 0.9809 ± 0.0020. Feature importance analysis identified sensors O1 (11.81%), P7 (10.59%), and F7 (10.15%) as the most dominant contributors. These results confirm that combining IQR Clipping with Random Forest produces a stable, accurate, and neuroanatomically interpretable model for EEG-based eye state classification, offering a strong foundation for real-world BCI and driver drowsiness detection systems.

Copyrights © 2026






Journal Info

Abbrev

sinkron

Publisher

Subject

Computer Science & IT

Description

Scope of SinkrOns Scientific Discussion 1. Machine Learning 2. Cryptography 3. Steganography 4. Digital Image Processing 5. Networking 6. Security 7. Algorithm and Programming 8. Computer Vision 9. Troubleshooting 10. Internet and E-Commerce 11. Artificial Intelligence 12. Data Mining 13. Artificial ...