The predictive value of serological markers for successful weaning and 30-day mortality in patients with severe intracerebral hemorrhage Authors: Bowen Yang, Xiaodong Huang, Li He, Yu Zhang, Lingling Duan, Zhan Wang, Yanfeng Zhu, Junti Lu Published: 2026 ABSTRACT AbstractAimThis study intends to screen serological indicators related to weaning outcomes and 30-day mortality in severe intracerebral hemorrhage (ICH) patients, use machine learning (ML) algorithms to construct predictive models, and explore their predictive value.MethodsData for this study were derived from the Medical Information Mart for Intensive Care (MIMIC)-IV database, which was divided into training and testing sets at a 7:3 ratio. Random Forest (RF) feature importance ranking was used to evaluate feature importance. Nine ML algorithms were applied to construct predictive models for successful weaning/30-day mortality.ResultsA total of 1,058 participants were enrolled in this study, among whom 242 achieved successful weaning. In the testing set, among the 9 ML models for predicting successful weaning, extreme Gradient Boosting (XGBoost) showed the best predictive performance, with an AUC of 0.580, an accuracy of 0.582, a sensitivity of 0.522, and a specificity of 0.598. Among the 9 ML models for predicting 30-day mortality, RF showed the best predictive performance, with an AUC of 0.693, an accuracy of 0.642, a sensitivity of 0.627, and a specificity of 0.656. In the DCA curve for predicting successful weaning, within the threshold range of 20%–30%, the clinical net benefits of Decision Tree (DT), Light Gradient Boosting Machine (LightGBM), Support Vector Machine (SVM), XGBoost, and Ridge were all higher than those of the “treat all” and “treat none” models.ConclusionXGBoost and RF exhibited relatively better performance among tested models in predicting successful weaning and 30-day mortality, respectively. Weight, glucose, WBC, MCHC, and temperature were the five key influencing factors for successful weaning. Age, APS III, glucose, WBC, and LODS were the most critical prognostic factors for 30-day mortality. This study provides a concise and practical reference tool for clinical risk stratification and decision-making.Keywords: Intracerebral hemorrhage, Successful weaning, 30-day mortality, XGBoost, Random Forest, Serological markers Introduction Intracerebral hemorrhage (ICH) ranks among the leading subtypes of cerebrovascular disease globally in terms of incidence, mortality, and disability rates [1]. The annual incidence of ICH is approximately 24.6 per 100,000 people [2], with a 30-day mortality rate of 30%-40%; only 12%-39% of patients can achieve long-term independent function [3]. Respiratory diseases are among the most common complications in Intensive Care Unit (ICU) patients and also a reason for the use of mechanical ventilation [4] Mechanical ventilation-related outcomes such as delayed weaning and weaning failure have become key factors affecting patients’ treatment cycles and rehabilitation processes [5]. Currently, clinically commonly used weaning prediction indicators and scoring systems such as the Acute Physiology and Chronic Health Evaluation Ⅱ (APACHE Ⅱ) and Sequential Organ Failure Assessment (SOFA) [6], mostly rely on subjective assessment or limited physiological parameters. Their predictive efficacy for weaning outcomes and short-term prognosis in ICH patients is limited, making it difficult to meet the clinical needs of precision medicine [7]. Therefore, identifying objective, accessible, and efficient predictive indicators and establishing accurate prognostic assessment models are of great significance for optimizing mechanical ventilation management in ICH patients, formulating individualized treatment plans, and improving prognosis. As important indicators reflecting the pathophysiological state of the body, serological indicators have advantages such as convenient detection, repeatability, and low cost, and have been widely used in prognostic assessment [8]. A study in the German population found that serum urea and albumin at admission are independent predictors of in-hospital mortality in ICU patients with spontaneous ICH [9]. Another study based on the Medical Information Mart for Intensive Care Ⅳ (MIMIC-IV) found that the serum anion gap is a predictor of 28-day and 180-day mortality in patients with non-traumatic ICH [10]. Chinese scholars found that the Glucose-to-Potassium Ratio (GPR) is significantly associated with poor 90-day prognosis in ICH patients [11]. However, most existing studies focus on the predictive value of single or a few serological indicators, lacking systematic exploration of multi-indicator combined prediction, which limits the application value of serological indicators in clinical practice. As a core technology of artificial intelligence, machine learning (ML) has the advantages of efficiently processing high-dimensional data, exploring potential correlations between variables, and constructing accurate predictive models, and has shown broad application prospects in the field of prognostic assessment [12]. A study pointed out that the extreme Gradient Boosting (XGBoost) ML model exhibits strong performance in predicting mortality from non-traumatic ICH, with an Area Under the Curve (AUC) value of 0.74 [13]. Compared with traditional statistical methods, ML algorithms can integrate multi-dimensional data such as clinical features and laboratory indicators, effectively avoiding the limitations of single indicators and significantly improving the efficacy of predictive models [14]. Based on this, this study intends to rely on the MIMIC-IV database to systematically screen serological indicators related to weaning outcomes and 30-day mortality in critically ill ICH patients, use ML algorithms to construct predictive models, and explore their predictive value. It is expected to provide clinicians with an objective and accurate prognostic assessment tool to assist in optimizing treatment decisions and improving patient prognosis. Methods Data sources and ethics This study mainly used data from the MIMIC-IV database. The MIMIC-IV database collects clinical data of more than 190,000 patients admitted to Beth Israel Deaconess Medical Center from 2008 to 2019, with 450,000 hospitalizations recorded. The database contains detailed information on patient demographics, laboratory tests, medications, vital signs, surgical procedures, disease diagnoses, medication management, and follow-up survival status. Since MIMIC-IV is a public database, this study meets the criteria for exemption from informed consent, and no additional informed consent from participants was required. Inclusion and exclusion criteria Inclusion criteria: Diagnosis of ICH based on the International Classification of Diseases (ICD) coding system (9th or 10th revision), including ICD-9 code 431 and ICD-10 codes I610–I619 and I62.9. Diagnosis of ICH based on the International Classification of Diseases (ICD) coding system (9th or 10th revision), including ICD-9 code 431 and ICD-10 codes I610–I619 and I62.9. Age ≥ 18 years. Age ≥ 18 years. Received mechanical ventilation. Received mechanical ventilation. Had complete serological indicators. Had complete serological indicators. First-time ICU admission. First-time ICU admission. Exclusion criteria: 1. Patients with ICU length of stay < 24 h. 2. Missing values of key variables. Outcomes The primary outcome measure of this study was successful weaning, and the secondary outcome measure was 30-day mortality. Successful weaning was defined as patients who could successfully complete the Spontaneous Breathing Trial (SBT) without triggering any premature termination criteria. Additionally, they required no reintubation, no non-invasive ventilation support within 48 h after extubation, and no death occurred [15]. Data collection The following indicators were collected: age, sex (female, male), race (black, other, white), weight; chronic pulmonary disease (no, yes), rheumatic disease (no, yes), renal disease (no, yes), hypertension (no, yes), diabetes (no, yes), mild liver disease (no, yes), severe liver disease (no, yes), heart rate, respiratory rate, temperature, oxygen saturation (SpO₂), systolic blood pressure (SBP), diastolic blood pressure (DBP), mean blood pressure (MBP), urine output, weight, SOFA, Acute Physiology and Chronic Health Evaluation Ⅲ score (APS Ⅲ), Logistic Organ Dysfunction System score (LODS), Glasgow Coma Scale score (GCS), Charlson Comorbidity Index (CCI), Oxford Acute Severity of Illness Score (OASIS), Systemic Inflammatory Response Syndrome score (SIRS), white blood cell count (WBC), red blood cell count (RBC), platelet, hemoglobin, hematocrit, total calcium, chloride, sodium, potassium, bicarbonate, creatinine, glucose, blood urea nitrogen (BUN), red blood cell distribution width (RDW), mean corpuscular hemoglobin concentration (MCHC), mean corpuscular volume (MCV), anion gap, international normalized ratio (INR), prothrombin time (PT), partial thromboplastin time (PTT), pH, partial pressure of oxygen (Po₂), partial pressure of carbon dioxide (Pco₂), and base excess. All serological indicators used in this study were the first test data obtained after patients were admitted to the ICU. Data cleaning and missing data imputation To reduce bias caused by missing data, variables with > 40% missing values were excluded from this study; data with ≤ 40% missing values were subjected to multiple imputation for subsequent analysis. Multiple imputation was performed with 5 imputations. In this study, imputation was conducted before data splitting into training and test sets. Feature selection, predictive model development, and evaluation This study was split into a training set and a test set at a ratio of 7:3. To avoid data leakage and ensure the objectivity of model evaluation, synthetic minority oversampling technique (SMOTE) was not applied in the entire process of model construction. Random Forest feature importance ranking was performed on the training set for feature selection, and the top 10 variables identified by this ranking were included in the machine learning models. ML algorithms including Logistic, XGBoost, Light Gradient Boosting Machine (LightGBM), Ridge, Decision Tree (DT), K-Nearest Neighbors (KNN), Random Forest (RF), Multi-Layer Perceptron (MLP), and Support Vector Machine (SVM) were used to construct predictive models for successful weaning/30-day mortality in ICH patients.The AUC, accuracy, sensitivity, specificity, F1 score and precision and decision curve analysis (DCA) were used to evaluate the reliability and clinical application value of the 9 ML models. After a comprehensive comparison of different ML models, the model with the best predictive performance was selected as the final predictive model. Finally, SHapley Additive exPlanations (SHAP) were used to rank the importance of each feature. Statistical analysis Data cleaning and analysis were performed using R software (Version 4.3.2). Normally distributed quantitative data were expressed as mean ± standard deviation, and intergroup comparisons were performed using analysis of variance. Non-normally distributed quantitative data were expressed as median (interquartile range), and intergroup comparisons were conducted using the Kruskal-Wallis test. Qualitative data were presented as counts (percentages), and intergroup comparisons were made using the chi-square test or Fisher’s exact test. A difference was considered statistically significant when P < 0.05. Results Patient baseline characteristics A total of 1,058 participants were enrolled in this study, among whom 242 participants achieved successful weaning (Fig. 1; Table 1). Compared with participants who did not achieve successful weaning, those in the successful weaning group had a higher proportion of other races (49.6% VS 42.3%, P = 0.004), higher body temperature (36.95 VS 36.81, P = 0.023), higher SpO₂ (98.66 VS 98.10, P = 0.030), lower SOFA score (4.00 VS 4.71, P = 0.003), lower APS III score (39.82 VS 45.15, P = 0.001), lower LODS score (4.34 VS 5.03, P = 0.001), lower GCS score (13.02 VS 12.26, P = 0.007), lower SIRS score (2.68 VS 2.82, P = 0.048), and lower anion gap (14.64 VS 15.24, P = 0.047). Participant screening flowchart Table 1Patient baseline datalevelUnsuccessful Weaning (N = 816)Successful Weaning (N = 242) P Statistical MethodGender (%)Female374 (45.8)110 (45.5)0.976Chi-square TestMale442 (54.2)132 (54.5)Age (years)66.16 (14.54)65.17 (16.02)0.364Independent Samples t-testRace (%)Black82 (10.0)35 (14.5)0.004Chi-square TestOther345 (42.3)120 (49.6)White389 (47.7)87 (36.0)Chronic pulmonary disease (%)No691 (84.7)213 (88.0)0.235Chi-square TestYes125 (15.3)29 (12.0)Rheumatic disease (%)No800 (98.0)238 (98.3)0.968Chi-square TestYes16 ( 2.0)4 ( 1.7)Renal disease (%)No694 (85.0)201 (83.1)0.514Chi-square TestYes122 (15.0)41 (16.9)Hypertension (%)No323 (39.6)104 (43.0)0.384Chi-square TestYes493 (60.4)138 (57.0)Diabetes (%)No581 (71.2)174 (71.9)0.896Chi-square TestYes235 (28.8)68 (28.1)Mild liver disease (%)No750 (91.9)223 (92.1)1.000Chi-square TestYes66 ( 8.1)19 ( 7.9)Severe liver disease (%)No787 (96.4)231 (95.5)0.604Chi-square TestYes29 ( 3.6)11 ( 4.5)Heart rate (mean (SD))83.44 (19.58)82.69 (17.54)0.596Independent Samples t-testRespiratory rate (mean (SD))19.05 (4.90)19.39 (5.09)0.342Independent Samples t-testTemperature (mean (SD))36.81 (0.87)36.95 (0.76)0.023Independent Samples t-testSpo2 (mean (SD))98.10 (3.72)98.66 (2.70)0.030Independent Samples t-testSBP (mean (SD))137.35 (26.32)136.11 (25.38)0.515Independent Samples t-testDBP (mean (SD))75.34 (18.11)75.98 (18.31)0.634Independent Samples t-testMBP (mean (SD))92.43 (18.64)92.74 (18.88)0.822Independent Samples t-testUrine output (mean (SD))2023.32 (1521.45)1851.16 (1058.90)0.100Independent Samples t-testWeight (mean (SD))79.53 (21.57)78.27 (23.03)0.433Independent Samples t-testSOFA (mean (SD))4.71 (3.38)4.00 (2.97)0.003Independent Samples t-testAPS III (mean (SD))45.15 (22.35)39.82 (19.10)0.001Independent Samples t-testLODS (mean (SD))5.03 (2.84)4.34 (2.60)0.001Independent Samples t-testGCS (mean (SD))12.26 (3.92)13.02 (3.56)0.007Independent Samples t-testCCI (mean (SD))5.69 (2.73)5.89 (2.61)0.304Independent Samples t-testOASIS (mean (SD))36.56 (7.24)36.18 (7.13)0.471Independent Samples t-testSIRS (mean (SD))2.82 (0.94)2.68 (0.93)0.048Independent Samples t-testWBC (mean (SD))12.67 (5.53)12.19 (4.55)0.222Independent Samples t-testRBC (mean (SD))3.98 (0.75)4.02 (0.71)0.456Independent Samples t-testPlatelet (mean (SD))213.93 (95.03)211.42 (83.35)0.710Independent Samples t-testHemoglobin (mean (SD))11.96 (2.15)11.90 (2.11)0.698Independent Samples t-testHematocrit (mean (SD))36.00 (6.15)36.15 (5.93)0.733Independent Samples t-testTotal Calcium (mean (SD))8.55 (0.83)8.60 (0.67)0.394Independent Samples t-testChloride (mean (SD))103.74 (5.98)103.85 (5.78)0.81Independent Samples t-testSodium (mean (SD))139.02 (5.17)138.93 (5.52)0.814Independent Samples t-testPotassium (mean (SD))3.99 (0.78)3.95 (0.70)0.570Independent Samples t-testBicarbonate (mean (SD))22.81 (4.05)22.38 (3.59)0.136Independent Samples t-testCreatinine (mean (SD))1.28 (1.22)1.15 (0.97)0.125Independent Samples t-testGlucose (mean (SD))160.67 (73.59)159.26 (75.65)0.795Independent Samples t-testBUN (mean (SD))21.89 (18.47)20.39 (14.99)0.247Independent Samples t-testRDW (mean (SD))14.44 (1.78)14.47 (2.25)0.849Independent Samples t-testMCHC (mean (SD))33.15 (1.53)33.00 (1.63)0.203Independent Samples t-testMCV (mean (SD))91.09 (7.41)90.38 (7.09)0.191Independent Samples t-testAnion gap (mean (SD))15.24 (4.18)14.64 (4.00)0.047Independent Samples t-testINR (mean (SD))1.29 (0.61)1.26 (0.47)0.559Independent Samples t-testPT (mean (SD))14.15 (6.32)14.39 (10.04)0.651Independent Samples t-testPTT (mean (SD))31.99 (17.33)30.41 (15.55)0.202Independent Samples t-testPH (mean (SD))7.41 (0.09)7.42 (0.09)0.228Independent Samples t-testPo2 (mean (SD))172.89 (95.95)185.30 (106.74)0.086Independent Samples t-testPco2 (mean (SD))38.47 (9.77)37.67 (10.74)0.278Independent Samples t-testBase excess (mean (SD))-0.09 (4.38)0.10 (3.51)0.540Independent Samples t-testSpo2 Oxygen saturation, SBP Systolic blood pressure, DBP Diastolic blood pressure, MBP Mean blood pressure, SOFA Sequential organ failure assessment, APS III Acute physiology score III, LODS Logistic organ dysfunction score, GCS Glasgow Coma scale, CCI Charlson Comorbidity index, OASIS Outcome and assessment information set, SIRS Systemic inflammatory response syndrome, WBC White blood cell count, RBC Red blood cell count, BUN Blood urea nitrogen, RDW Red cell distribution width, MCHC Mean corpuscular hemoglobin concentration, MCV Mean corpuscular volume, INR International normalized ratio, PT Prothrombin time, PTT Partial thromboplastin time, PH Potential of hydrogen, Po2 Partial pressure of oxygen, Pco2 Partial pressure of carbon dioxide Patient baseline data Spo2 Oxygen saturation, SBP Systolic blood pressure, DBP Diastolic blood pressure, MBP Mean blood pressure, SOFA Sequential organ failure assessment, APS III Acute physiology score III, LODS Logistic organ dysfunction score, GCS Glasgow Coma scale, CCI Charlson Comorbidity index, OASIS Outcome and assessment information set, SIRS Systemic inflammatory response syndrome, WBC White blood cell count, RBC Red blood cell count, BUN Blood urea nitrogen, RDW Red cell distribution width, MCHC Mean corpuscular hemoglobin concentration, MCV Mean corpuscular volume, INR International normalized ratio, PT Prothrombin time, PTT Partial thromboplastin time, PH Potential of hydrogen, Po2 Partial pressure of oxygen, Pco2 Partial pressure of carbon dioxide Feature selection This study used the RF algorithm to rank feature importance. For successful weaning, the top 10 variables in feature importance ranking were weight, glucose, MCHC, RDW, WBC, age, RBC, DBP, temperature, and hematocrit (Fig. 2-A). For 30-day mortality, the top 10 variables in feature importance ranking were age, APS III, WBC, glucose, OASIS, weight, DBP, temperature, LODS, and GCS (Fig. 2-B). Random Forest-Based Feature Importance Ranking: (A) Successful Weaning, (B) 30-Day Mortality Predictive models In the testing set, among the 9 ML models for predicting successful weaning, XGBoost showed the best predictive performance, with an AUC of 0.580 (0.537–0.623), an accuracy of 0.582, a sensitivity of 0.522, a specificity of 0.598, a F1 score of 0.345 and a precision of 257 (Table 2; Fig. 3-A). Among the 9 ML models for predicting 30-day mortality, RF showed the best predictive performance, with an AUC of 0.693 (0.635–0.751), an accuracy of 0.642, a sensitivity of 0.627, a specificity of 0.656, a F1 score of 635, and a precision of 643 (Table 3; Fig. 3-B). Table 2Model performance on the validation set for successful weaningModelAUCAccuracySensitivitySpecificityF1 scorePrecisionLogistic0.499 (0.455–0.543)0.5310.4480.5540.2870.211DT0.567 (0.524–0.610)0.5850.4630.6180.3200.244Ridge0.516 (0.472–0.560)0.5790.4630.6100.3160.24KNN0.475 (0.431–0.519)0.7200.1490.8730.1830.238LightGBM0.533 (0.489–0.577)0.5380.5070.5460.3160.230RF0.544 (0.500-0.588)0.5820.4480.6180.3110.238XGBoost0.580 (0.537–0.623)0.5820.5220.5980.3450.257SVM0.512 (0.468–0.556)0.5250.4780.5380.2980.216MLP0.517 (0.473–0.561)0.6540.3130.7450.2760.247DT Decision tree, KNN k-nearest neighbors, LightGBM Light gradient boosting machine, RF Random forest, XGBoost Extreme gradient boosting, SVM Support vector machine, MLP Multilayer perceptron Model performance on the validation set for successful weaning DT Decision tree, KNN k-nearest neighbors, LightGBM Light gradient boosting machine, RF Random forest, XGBoost Extreme gradient boosting, SVM Support vector machine, MLP Multilayer perceptron ROC Curves of 9 Machine Learning Models: (A) Successful Weaning, (B) 30-Day Mortality. ROC: receiver operating characteristic; DT: decision tree; KNN: k-nearest neighbors; LightGBM: light gradient boosting machine; RF: random forest; XGBoost: extreme gradient boosting; SVM: support vector machine; MLP: multilayer perceptron Table 3Model performance on the testing set for 30-day mortalityModelAUCAccuracySensitivitySpecificityF1 scorePrecisionLogistic0.641 (0.580–0.702)0.6010.5890.6130.5940.60DT0.625 (0.566 − 0.684)0.5910.4560.7250.5260.621Ridge0.624 (0.562 − 0.685)0.5940.6960.4940.6300.576KNN0.643 (0.582 − 0.704)0.6130.4810.7440.5530.650LightGBM0.682 (0.623 − 0.741)0.6480.6270.6690.6390.651RF0.693 (0.635 − 0.751)0.6420.6270.6560.6350.643XGBoost0.690 (0.632 − 0.748)0.6350.6770.5940.6480.622SVM0.636 (0.576 − 0.697)0.5880.5950.5810.5890.584MLP0.640 (0.579 − 0.701)0.5910.5820.6000.5860.590DT Decision tree, KNN K-nearest neighbors, LightGBM Light gradient boosting machine, RF Random forest, XGBoost Extreme gradient boosting, SVM Support vector machine, MLP Multilayer perceptron Model performance on the testing set for 30-day mortality DT Decision tree, KNN K-nearest neighbors, LightGBM Light gradient boosting machine, RF Random forest, XGBoost Extreme gradient boosting, SVM Support vector machine, MLP Multilayer perceptron In the DCA curve for predicting successful weaning, within the threshold range of 20%-30%, the clinical net benefits of DT, LightGBM, SVM, XGBoost, and Ridge were all higher than those of the “treat all” and “treat none” models (Fig. 4-A). In the DCA curve for predicting 30-day mortality, within the threshold range of 40%-70%, the clinical net benefits of RF, LightGBM, SVM, XGBoost, Ridge, KNN, Logistic, and MLP were all higher than those of the “treat all” and “treat none” models (Fig. 4-B). Decision Curve Analysis Curves of 9 Machine Learning Models: (A) Successful Weaning, (B) 30-Day Mortality. DT: decision tree; KNN: k-nearest neighbors; LightGBM: light gradient boosting machine; RF: random forest; XGBoost: extreme gradient boosting; SVM: support vector machine; MLP: multilayer perceptron Interpretation of ML models In the SHAP plot for successful weaning, weight was the most critical influencing factor, followed by glucose, WBC, MCHC, and temperature (Fig. 5-A). In the SHAP plot for 30-day mortality, age was the most critical influencing factor, followed by APS III, glucose, WBC, and LODS (Fig. 5-B). SHAP Plots of the XGBoost Model: (A) Successful Weaning, (B) 30-Day Mortality. SHAP: SHapley Additive exPlanations; XGBoost: extreme Gradient Boosting Discussion This study was based on the MIMIC-IV database, enrolling 1058 critically ill ICH patients, systematically explored the predictive value of serological indicators combined with ML algorithms for successful weaning and 30-day mortality, identified the key influencing factors and optimal predictive models for these two prognostic endpoints, and provided a new reference for clinical precise assessment and treatment decision-making. The racial disparities in weaning success rates observed in this study (with relatively higher success rates in the “Other” and “Black” groups) may reflect systemic factors related to medical practice patterns or data structure. First, studies have indicated that Black and ethnic minority patients in the MIMIC-IV database have a significantly lower probability of receiving invasive mechanical ventilation compared with White patients [16]. If the “unsuccessful weaning group” includes a larger proportion of patients who were intubated due to more aggressive initial treatment, such treatment disparities would manifest as racial differences in weaning outcomes. Second, race is often strongly correlated with socioeconomic factors (e.g., Medicaid coverage), which themselves affect healthcare accessibility and long-term outcomes and may constitute residual confounding in the data [17]. The observed trend of lower SOFA scores in patients with successful weaning may stem from the mismatch between the inherent design logic of the SOFA scoring system and the core mechanisms underlying weaning difficulties in patients with ICH. The SOFA score is primarily designed to quantify the severity of organ dysfunction over time in patients with sepsis or critical illness, with its core evaluation dimensions focusing on systemic inflammatory responses or multiple organ failure caused by shock. However, the primary and direct limiting factor for successful weaning in ICH patients is often the severity of primary brain injury and the resulting neurological deficits, rather than typical systemic multiple organ failure. A study focusing on post-operative ICH patients also demonstrated that the predictive factor for extubation failure was white blood cell count [18], rather than the SOFA score. After comparing 9 ML algorithms, this study found that the XGBoost model has relatively better performance among tested models in predicting successful weaning, while the RF model showed the highest efficacy in predicting 30-day mortality. Moreover, the models for both outcomes exhibited relatively balanced performance in terms of accuracy, sensitivity, and specificity. However, the AUC value for successful weaning prediction in this study was relatively low, which may be attributed to the complexity of weaning outcomes: unincorporated variables such as mechanical ventilation modes and respiratory mechanics parameters may all exert significant impacts on weaning results [19, 20]. In addition, it may also be related to disturbance of consciousness [21] and fine localization such as brainstem hemorrhage [22]. Although the AUC value for 30-day mortality prediction was higher than that for successful weaning, the overall predictive performance was not particularly excellent. This was presumably related to sample heterogeneity; for instance, differences in ICH locations and complications among patients may have impaired the model’s predictive efficacy [23, 24]. Notably, despite the low AUC for predicting successful weaning, it still outperformed the predictions by SOFA (AUC = 0.424, data not provided in the results section) and GCS (AUC = 0.566, data not provided in the results section). This phenomenon may be related to the inherent characteristics of serological indicators: First, objectivity and quantifiability. Laboratory test results are less affected by subjective judgment, providing stable and reproducible quantitative data, which avoids the inter-observer variability commonly seen in clinical scoring systems. Second, accessibility and cost-effectiveness. Routine tests such as blood routine and biochemistry have become regular and frequent monitoring items in the ICU, without the need for additional expensive equipment or complex operations, making them easy to promote and implement in medical institutions at all levels. Third, the value of information integration. Although the efficacy of a single indicator is limited, systematic screening and combination of multiple indicators through methods such as machine learning can reveal the comprehensive impact of different pathophysiological pathways (e.g., inflammation, metabolism, organ function), thereby constructing a predictive model with more comprehensive information. Therefore, although there is still room for improvement in the absolute efficacy of the current model, the predictive strategy based on serological indicators represents a feasible, objective research direction with continuous optimization potential. This lays an important methodological foundation and practical basis for constructing higher-performance predictive models by integrating multi-dimensional data (such as neuroimaging features and temporal changes of vital signs) in the future. In the weaning outcome, the SHAP plot showed that weight, glucose, WBC, MCHC, and temperature were the five most critical influencing factors. Our study findings indicated that weight, glucose, and WBC and MCHC showed a negative correlation with weaning success, while temperature were positively correlated with weaning success. Fat accumulation in the chest wall of obese patients reduces chest wall compliance, requiring greater respiratory muscle strength for lung expansion. At the same time, abdominal fat compresses the diaphragm, causing the diaphragm to shift upward and reducing functional residual capacity, which further impairs lung ventilation efficiency [25]. In addition, obesity is often accompanied by sleep apnea or chronic inflammation, which increases the risk of apnea/hypopnea after weaning and indirectly leads to weaning failure [26]. Hyperglycemia increases the risk of pulmonary infection through immune impairment, weakens weaning tolerance, and raises the risk of weaning failure [27]. An elevated WBC count indicates uncontrolled systemic inflammation; inflammatory factors can damage lung function, induce ventilator-associated pneumonia, and simultaneously inhibit respiratory muscle contraction, leading to respiratory muscle fatigue and aggravated hypoxia, thus increasing the risk of weaning failure [28, 29]. MCHC may reflect the oxygen-carrying capacity of red blood cells. Low MCHC may promote weaning success by optimizing red blood cell deformability and reducing blood viscosity to improve respiratory muscle microcirculatory perfusion [30–32]. Moderate hyperthermia (≤ 38.5℃) may enhance weaning success rate by activating respiratory muscle metabolic enzyme activity and improving airway clearance capacity. In the 30-day mortality outcome, the SHAP plot showed that age, APS III, glucose, WBC, and LODS were the five most critical influencing factors. Age has been identified as an independent risk factor for 30-day mortality in ICH in multiple studies [33, 34]. With increasing age, the body’s organ functional reserve decreases significantly, the tolerance to ischemia, hypoxia, and inflammatory stress after ICH weakens, and the probability of comorbid underlying diseases increases. These factors lead to a higher risk of multiple organ failure, directly raising the short-term mortality rate [35]. As a comprehensive assessment tool for the severity of critical illness, a higher APS III score may reflect that the patient has involvement of multiple organ functions and significant disorders of physiological indicators. This indicates more severe systemic pathophysiological disturbances after ICH and exhaustion of the body’s compensatory capacity, resulting in a substantial increase in short-term mortality risk [36]. Hyperglycemia can exacerbate secondary brain injury after ICH, induce infections and multiple organ dysfunction, and increase the risk of 30-day mortality [37].A significant increase in WBC indicates uncontrolled inflammation; inflammatory factors can aggravate cerebral edema, induce pulmonary infections or sepsis, subsequently cause multiple organ damage, and thereby increase the risk of 30-day mortality [38]. A high LODS score indicates obvious damage to key organs such as the brain, lungs, and kidneys. Multiple organ dysfunction is a core cause of short-term mortality, and the higher the LODS score, the higher the mortality rate [39, 40]. This study still had certain limitations. First, serological indicators only used the first test results after patients were admitted to the ICU, failing to reflect the dynamic changes of indicators during disease progression. However, dynamically monitored serological indicators may more accurately reflect the fluctuations of disease progression and their association with prognosis. Second, this study did not include potential influencing factors such as rehabilitation interventions, surgical history, and weaning-related factors, which may have omitted key predictive variables and resulted in the model efficacy not being fully exerted. Third, this study lacks external validation, which limits the generalizability of the model. Fourth, although the KNN model has an extremely high accuracy (0.720), its sensitivity is extremely low (0.149), which is misleading accuracy caused by class imbalance. Finally, the MIMIC-IV database predominantly includes American populations; ethnic differences may affect the applicability of the results among different ethnic groups, so subsequent multicenter studies involving Asian populations are needed for further validation. Conclusion XGBoost and RF exhibited relatively better performance among tested models in predicting successful weaning and 30-day mortality, respectively. Weight, glucose, WBC, MCHC, and temperature were the five key influencing factors for successful weaning. Age, APS III, glucose, WBC, and LODS were the most critical prognostic factors for 30-day mortality. This as a pilot study for model generation and emphasize the need for multi-center validation. Our study provided a concise and practical reference tool for clinical risk stratification and decision-making. Acknowledgements Not applicable. Authors’ contributions Bowen Yang: Writing- original draft, Writing- review &editing and Conceptualization; Xiaodong Huang: Writing- review &editing and Methodology; LiHe: Writing- review &editing and Formal Analysis; Yu Zhang: Writing- review &editing and Project administration; Lingling Duan: Writing- review &editing and Validation; Zhan Wang: Writing- review &editing and Resources; Yanfeng Zhu: Writing- review &editing and Software; Junti Lu: Writing- review &editing and Supervision. Funding Not applicable. Data availability The data for this study are sourced from the MIMIC database (https://physionet.org/content/mimiciv/3.1/). Declarations Ethics approval and consent to participate Not applicable. Consent for publication Not applicable. Competing interests The authors declare no competing interests. Footnotes Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The data for this study are sourced from the MIMIC database (https://physionet.org/content/mimiciv/3.1/).