Facebook pixel tracking

The Science and Information (SAI) Organization publishes open-access peer-reviewed journals in computer science and artificial intelligence.

Contact Info
Website thesai.org
Follow Us
Contact Info
Follow Us
Research Article | Open Access |

Machine Learning Application in Healthcare: A Case Study Using Ensemble Methods for Hospital Length of Stay Prediction

Author 1: Hakima Reddad Author 2: Maria Zemzami Author 3: Norelislam El Hami Author 4: Nabil Hmina Author 5: Farouk Yalaoui
International Journal of Advanced Computer Science and Applications (IJACSA) · Vol. 17, No. 3 · Published 2026

DOI: https://doi.org/10.14569/IJACSA.2026.0170386

Abstract

Artificial intelligence is driving digital transformation across multiple sectors, including healthcare, pharmaceuticals, industrial production, and the automotive industry. In healthcare specifically, AI-powered predictive analytics offer significant potential for optimizing operational efficiency and resource allocation. To demonstrate this potential, we present a case study focused on hospital length of stay (LOS) prediction using 2,125,280 admission records from the New York SPARCS database. We implemented and compared four machine learning algorithms: Linear Regression, Random Forest, Gradient Boosting, and XGBoost. Following hyperparameter optimization, the XGBoost model achieved superior performance with R²=0.8686, RMSE=3.24 days, and MAE=1.42 days, substantially outperforming Linear Regression (R²=0.5339, RMSE=6.10 days, MAE=2.86 days). Prediction accuracy reached 63.34% within ±1 day and 89.44% within ±3 days of actual LOS. SHAP analysis identified Total Costs, Total Charges, Hospital Service Area, APR Medical Surgical Description, and APR DRG Code as the most impactful predictors. Performance varied across LOS categories, with MAE ranging from 0.66 days for short stays (1-3 days) to 11.81 days for extended hospitalizations (>30 days). These results demonstrate that ensemble machine learning methods, particularly XGBoost, provide clinically meaningful accuracy for healthcare operational planning, though challenges remain for extended stays and complex cases requiring specialized modeling approaches.

Keywords

How to Cite this Article

Reddad, H., Zemzami, M., Hami, N. E., Hmina, N., & Yalaoui, F. (2026). Machine Learning Application in Healthcare: A Case Study Using Ensemble Methods for Hospital Length of Stay Prediction. International Journal of Advanced Computer Science and Applications, 17(3). https://doi.org/10.14569/IJACSA.2026.0170386

Reddad, Hakima, et al.. "Machine Learning Application in Healthcare: A Case Study Using Ensemble Methods for Hospital Length of Stay Prediction." International Journal of Advanced Computer Science and Applications, vol. 17, no. 3, 2026, https://doi.org/10.14569/IJACSA.2026.0170386.

@article{Reddad2026,
  title     = {Machine Learning Application in Healthcare: A Case Study Using Ensemble Methods for Hospital Length of Stay Prediction},
  journal   = {International Journal of Advanced Computer Science and Applications},
  volume    = {17},
  number    = {3},
  year      = {2026},
  publisher = {The Science and Information Organization},
  author    = {Hakima Reddad and Maria Zemzami and Norelislam El Hami and Nabil Hmina and Farouk Yalaoui},
  doi       = {10.14569/IJACSA.2026.0170386},
  url       = {https://doi.org/10.14569/IJACSA.2026.0170386}
}

Open Access — licensed under a Creative Commons Attribution 4.0 International License. Unrestricted use, distribution, and reproduction in any medium, even commercially, as long as the original work is properly cited.