Journal of Computer Science and Information Technology
Vol. 2 No. 2 (2026): Journal of Computer Science and Information Technology, June 2026

Prediksi Kebutuhan Rawat Inap Pasien Berdasarkan Data Hematologi Menggunakan Random Forest dengan Hyperparameter Optimization dan SHAP Explainability

Milla Akbarany Baktiar Putri Putri (Department of Data Science, Universitas Pembangunan Nasional "Veteran" Jawa Timur, Surabaya, Indonesia)
Hana Titania Sastrian (Department of Data Science, Universitas Pembangunan Nasional "Veteran" Jawa Timur, Surabaya, Indonesia)
Muhammad Erlangga Kurniawan (Department of Data Science, Universitas Pembangunan Nasional "Veteran" Jawa Timur, Surabaya, Indonesia)
Andri Fauzan Adziima (Department of Data Science, Universitas Pembangunan Nasional "Veteran" Jawa Timur, Surabaya, Indonesia)
Kartika Maulida Hindrayani (Department of Data Science, Universitas Pembangunan Nasional "Veteran" Jawa Timur, Surabaya, Indonesia)
Muhammad Zulhaj Aliansyah (Department of Data Science, Universitas Pembangunan Nasional "Veteran" Jawa Timur, Surabaya, Indonesia)



Article Info

Publish Date
28 Jun 2026

Abstract

Determining whether a patient requires inpatient or outpatient care is one of the most critical clinical decisions in healthcare facility management. Complete blood count (CBC) parameters provide routine and rapidly available physiological indicators, making them strong candidates for machine learning-based clinical decision support systems. This study aims to develop a prediction model for patient hospitalization needs using the Random Forest algorithm optimized through RandomizedSearchCV, combined with SHAP (SHapley Additive exPlanations) for model interpretability. The dataset consists of 4,412 patient records from an Indonesian private hospital available on Kaggle, containing nine hematological parameters and two demographic attributes. Feature engineering was applied by constructing three derived variables: leucocyte-thrombocyte ratio (leu_throm_ratio), hemoglobin-hematocrit ratio (hb_hct_ratio), and thrombocyte-age interaction (platelet_age). Two models were compared: a baseline Random Forest with manually configured hyperparameters and an optimized model using RandomizedSearchCV with Stratified 5-Fold Cross Validation. The baseline model achieved accuracy of .7633 and ROC AUC of .8097, while the optimized model yielded accuracy of .7644 and ROC AUC of .8131 on the test set. Feature importance analysis identified thrombocyte (.1655) and leu_throm_ratio (.1525) as the dominant predictors, together contributing over 31% of the model's predictive information. SHAP analysis confirmed that low thrombocyte values and high leucocyte values were the primary drivers of inpatient predictions, consistent with clinical indicators of infection and systemic inflammation. These findings demonstrate that Random Forest with clinically grounded feature engineering and SHAP interpretability provides a transparent and reasonably accurate approach for supporting hospital admission triage decisions.

Copyrights © 2026






Journal Info

Abbrev

jocsit

Publisher

Subject

Computer Science & IT

Description

Journal of Computer Science and Information Technology (JOCSIT) is a scientific journal in computers that contains research results and literature studies, managed by Lembaga Publikasi Ilmiah Nusantara. JOCSIT journal provides a platform for researchers, academics, professionals, practitioners and ...