$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
Database access and software environment
Obtain authorized access to the Medical Information Mart for Intensive Care IV database (MIMIC-IV, v3.1) after completing the required training on ethical data use (Certification ID: 69002811). According to the Measures for Ethical Review of Life Science and Medical Research Involving Human Subjects (February 18, 2023, China), Article 32 stipulates that research using legally obtained public data, data generated without interfering with public behavior, or anonymized information is exempt from ethics review. Consistent with these provisions, this study was exempt from institutional ethical approval. The data use protocol and ethical guidelines were strictly followed, and the study was conducted solely for scientific research purposes. Set up the database environment using PostgreSQL (v17.1.11). Use Navicat Premium (v17) as the database management and query interface to run SQL queries and export extracted datasets for analysis.
Patient selection
Identify patients with lung cancer in MIMIC-IV using International Classification of Diseases, Ninth and Tenth Revision (ICD-9 and ICD-10) codes17. Apply the following exclusion criteria sequentially: Age <18 years or >90 years; Missing serum albumin measurements within the first 24 h of ICU admission; Multiple ICU or hospital admissions; ICU length of stay <24 h.
Variable extraction
Extract variables from MIMIC-IV (v3.1) using PostgreSQL (v17.1.11) via Navicat Premium (v17), including: demographics, vital signs, laboratory tests, comorbidities, therapeutic interventions, severity scores, and outcomes. Demographics: age, gender. Vital signs within the first 24 h after ICU admission: heart rate (HR), respiratory rate (RR), oxygen saturation (SpO₂), and temperature. Laboratory variables within the first 24 h: serum albumin, glucose, creatinine, urea nitrogen, total bilirubin, hemoglobin, red blood cell (RBC) count, white blood cell (WBC) count, platelet count, red cell distribution width (RDW), alanine aminotransferase (ALT), aspartate aminotransferase (AST), prothrombin time (PT), calcium, potassium, sodium, chloride. Comorbidities from diagnostic records: hypertension, hepatic cirrhosis, chronic kidney disease, diabetes mellitus, chronic bronchitis, congestive heart failure, and chronic obstructive pulmonary disease (COPD). Severity scores at ICU admission: Sequential Organ Failure Assessment (SOFA), Simplified Acute Physiology Score II (SAPS II), Charlson Comorbidity Index, Acute Physiology and Chronic Health Evaluation II (APACHE II). Therapeutic interventions: systemic corticosteroids, antibiotics, vasopressors. Lifestyle factor: smoking history. For all laboratory variables and severity scores within the first 24 h, if multiple measurements are available, compute the average value across the 1st day and use this value for analysis. Exclude variables with more than 20% missing data. For variables with missingness ≤20%, perform imputation using the missForest algorithm, a random forest–based machine-learning method for handling mixed-type clinical data. The proportion of missing data for key variables is provided in Supplementary Table 1.
Outcome definition
Define the primary outcome as all-cause mortality within 28 days after ICU admission. Ascertain mortality status using death records available in the MIMIC-IV database. Classify patients as survivors or non-survivors based on 28-day mortality status.
Statistical analysis
Assess the distribution of continuous variables using the Shapiro–Wilk test. Compare normally distributed variables using Student’s t-test and non-normally distributed variables using the Wilcoxon rank-sum test. Compare categorical variables using the chi-square test. Perform least absolute shrinkage and selection operator (LASSO) regression with 10-fold cross-validation to select candidate variables and reduce multicollinearity. Construct multivariable Cox proportional hazards models to evaluate the independent association between serum albumin and 28-day mortality. Serum albumin was entered as both a continuous and categorical variable, and covariates selected by LASSO regression were included for adjustment. Hazard ratios (HRs) and 95% confidence intervals (CIs) were estimated. Explore nonlinear associations using restricted cubic spline (RCS) analysis. Knots were placed at predefined percentiles of the albumin distribution, and nonlinearity was assessed by testing the spline terms. Generate Kaplan–Meier survival curves and compare survival distributions using the log-rank test.
Machine learning model development and validation
Randomly split the dataset at the patient level into a training set (70%), a validation set (15%), and an independent test set (15%). Perform feature selection using the training set only by identifying the intersection of variables selected by LASSO regression and the Boruta algorithm, ensuring that only stable and relevant predictors are retained. Train eight machine-learning classifiers on the training set, including logistic regression, random forest, decision tree, support vector machine, XGBoost, LightGBM, complement naïve Bayes, and support vector classifier. Model performance was first assessed in the validation set and subsequently confirmed in the independent test set using the AUC-ROC, AUC-PR, accuracy, sensitivity, specificity, calibration curves, decision curve analysis, and learning curves.
Model interpretation and endpoint
Identify the best-performing machine-learning model based on validation performance metrics. Apply SHapley Additive Explanations (SHAP) to quantify the contribution of each feature to mortality prediction. Generate SHAP summary and dependence plots to visualize the relative importance and directionality of serum albumin and other predictors. Complete the analysis by integrating statistical and machine-learning results to establish an interpretable risk stratification framework.