Indonesian Journal of Electronics, Electromedical Engineering, and Medical Informatics
Vol. 8 No. 3 (2026): August

Optimization of Random Forest for Outpatient Cancellation Prediction Using PSO and Behavioral Feature Engineering

Azmi Abiyyu Dzaky (Department Informatics and Engineering, Faculty of Science, Universitas Dian Nuswantoro, Semarang, Indonesia)
Farrikh Alzami (Department Informatics and Engineering, Faculty of Science, Universitas Dian Nuswantoro, Semarang, Indonesia)
Pujiono Pujiono (Department Informatics and Engineering, Faculty of Science, Universitas Dian Nuswantoro, Semarang, Indonesia)



Article Info

Publish Date
05 Jul 2026

Abstract

Outpatient cancellations and no-shows, defined respectively as proactive withdrawals and silent attendance failures, were consolidated into a binary target variable representing failed appointments that result in a completed visit. This issue significantly reduces healthcare efficiency and increases operational costs. While machine learning is widely applied, the existing methods face critical trade-offs between computational resource demands and data integrity, often relying on synthetic resampling such as SMOTE that introduces artificial noise. This study further aims to develop an optimized, lightweight Decision Support System designed as a core engine for potential future Hospital Digital Twin and AI Command Center architectures. The primary contribution is Behavioral Feature Engineering utilizing a 12-month retrospective patient history as a natural data enrichment strategy, offering a robust alternative to artificial data generation. The proposed framework employs an optimized Random Forest classifier combined with Target Encoding, Mutual Information-based feature selection, and Particle Swarm Optimization for hyperparameter tuning. To ensure computational efficiency, the optimization was performed on a stratified 2% sample of 10,690 records from a large-scale dataset containing 686,387 records from three hospitals. The final model achieved an accuracy of 0.871, an F1-score of 0.870, and a ROC-AUC of 0.940, effectively surpassing recent 2024 state-of-the-art benchmarks even under significant class imbalance. Furthermore, Particle Swarm Optimization achieved a 75.6% reduction in tree complexity, requiring only 122 estimators instead of 500, while preserving peak performance. Multi-scheme validation under strict chronological temporal splits and patient-grouped cross-validation proved high generalization stability, yielding robust F1-scores of 0.855 and 0.867, with a narrow 95% confidence interval of [0.8692, 0.8728]. The entire end-to-end pipeline was completed in under 60 minutes using standard CPU resources. In conclusion, the proposed framework provides a robust and sustainable predictive engine suitable for proactive clinical resource management and future hospital digital integration

Copyrights © 2026






Journal Info

Abbrev

ijeeemi

Publisher

Subject

Computer Science & IT Control & Systems Engineering Decision Sciences, Operations Research & Management Electrical & Electronics Engineering Health Professions Materials Science & Nanotechnology

Description

Indonesian Journal of Electronics, Electromedical Engineering, and Medical Informatics (IJEEEMI) publishes peer-reviewed, original research and review articles in an open-access format. Accepted articles span the full extent of the Electronics, Biomedical, and Medical Informatics. IJEEEMI seeks to ...