# Machine learning models for predicting extended length of stay and hospital charges in nontraumatic subarachnoid hemorrhage

**Authors:** Di Wu, Sihan Wang, Cong Wang, Yijia Xiang, Lingyu Hao, Zhen Wang, Xingye Zhai, Yi Wang

PMC · DOI: 10.3389/fneur.2026.1737503 · Frontiers in Neurology · 2026-02-04

## TL;DR

This study uses machine learning to predict long hospital stays and high costs in nontraumatic subarachnoid hemorrhage patients, aiming to improve healthcare planning.

## Contribution

Developed and validated ML models, particularly CatBoost, for predicting extended length of stay and hospital charges in SAH patients.

## Key findings

- The CatBoost model achieved high accuracy (AUC 0.904) in predicting extended length of stay.
- Key predictors of extended LOS and high charges include hydrocephalus, vasospasm, and mechanical ventilation.
- Hospital region and number of procedures significantly affect costs in patients with prolonged stays.

## Abstract

Nontraumatic subarachnoid hemorrhage (SAH) is a critical condition requiring prolonged hospitalization and significant healthcare costs. Identifying factors contributing to extended length of stay (LOS) and predicting associated hospital charges can optimize clinical decision-making and resource allocation. This study aimed to construct and validate machine learning (ML) models to predict extended LOS and total charges in SAH using a national database.

A retrospective cohort study was conducted using data from the National Inpatient Sample database, including 25,092 adult SAH patients. Twelve ML models were trained to predict extended LOS (defined as >17 days) based on clinical and demographic data. The variable screening process included univariate analysis, Spearman correlation analysis, least absolute shrinkage and selection operator (LASSO) regression, and Recursive Feature Elimination. SHapley Additive exPlanations (SHAP) values were used for model interpretation. Performance was assessed through receiver operating characteristic curves, precision-recall curves, calibration curves, and decision curve analysis (DCA). A decision tree model was also created to predict total hospital charges based on LOS. To identify factors contributing to high hospital charges in patients with extended LOS, univariate analysis, multivariate logistic regression, and LASSO regression were performed to select the most significant predictors.

Among the 12 ML models, the Categorical Boosting (CatBoost) model demonstrated the highest predictive performance, with an area under the receiver operating characteristic curve of 0.904 upon internal validation and 0.910 on hold-out validation. The model’s performance was optimal when 7 features were included, showing strong calibration and clinical applicability per DCA and SHAP. The decision tree model revealed a positive correlation between LOS and hospital charges. Additionally, key factors for predicting extended LOS and hospital charges included hydrocephalus, cerebral vasospasm, mechanical ventilation, and age. In patients with extended LOS, factors associated with high hospital charges were the total number of procedures, respiratory failure, tracheostomy, and hospital region.

We constructed and validated ML models to predict extended LOS and hospital charges in SAH patients. The CatBoost model demonstrated strong predictive accuracy, while the decision tree model provided valuable insights into cost implications. Future multicenter studies are recommended to validate these models across diverse healthcare settings.

## Linked entities

- **Diseases:** subarachnoid hemorrhage (MONDO:0005099), hydrocephalus (MONDO:0001150), respiratory failure (MONDO:0021113)

## Full-text entities

- **Genes:** SHROOM4 (shroom family member 4) [NCBI Gene 57477] {aka MRXSSDS, SHAP, shrm4}
- **Diseases:** Hydrocephalus (MESH:D006849), communicable diseases (MESH:D003141), Sepsis (MESH:D018805), neurological impairment (MESH:D009422), arteriovenous malformations (MESH:D001165), depression (MESH:D003866), embolism (MESH:D004617), infections (MESH:D007239), urinary tract infection (MESH:D014552), thrombosis of deep veins (MESH:D020246), cerebrovascular anomalies (MESH:D002561), dysphagia (MESH:D003680), muscle spasm (MESH:D013035), anemia (MESH:D000740), SAH (MESH:D013345), death (MESH:D003643), occlusion of intracranial artery (MESH:D001157), Cerebral vasospasm (MESH:D020301), bleeding (MESH:D006470), Respiratory failure (MESH:D012131), pneumonia (MESH:D011014), aneurysmal rupture (MESH:D017542), stroke (MESH:D020521), chronic obstructive pulmonary disease (MESH:D029424), cerebral ischemia (MESH:D002545), LOS (MESH:D007870), anxiety (MESH:D001007), paralytic conditions (MESH:D000092164), critically ill (MESH:D016638), headache (MESH:D006261), gastroesophageal reflux (MESH:D005764), trauma (MESH:D014947), Pulmonary infection (MESH:D012141), cerebral aneurysm (MESH:D002532), coronary heart disease (MESH:D003327)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12913072/full.md

## Figures

7 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12913072/full.md

## References

50 references — full list in the complete paper: https://tomesphere.com/paper/PMC12913072/full.md

---
Source: https://tomesphere.com/paper/PMC12913072