Skip to main content
BMC Medical Informatics and Decision Making logoLink to BMC Medical Informatics and Decision Making
. 2026 Jul 29;26:429. doi: 10.1186/s12911-026-03701-z

Machine learning-based prediction of myocardial injury after hip replacement surgery: a single-center study with internal validation

Yan Huang 1, Dadong Han 1,✉, Tonglin Xia 1,✉
PMCID: PMC13700299  PMID: 42928187

Abstract

Objective

This study aimed to develop and internally validate a preoperative machine learning model for predicting myocardial injury after hip replacement surgery in middle-aged and elderly patients.

Materials and methods

A total of 453 middle-aged and elderly patients were included. The clinical outcome was myocardial injury after non-cardiac surgery (MINS). Feature selection was performed within the training set using recursive feature elimination. Based on the selected variables, nine machine learning models were constructed and compared. Model performance was evaluated using cross-validated AUC, repeated random split validation, calibration analysis, decision curve analysis, and clinical impact curves. SHAP analysis was used to interpret feature contributions.

Results

Eight preoperative features were ultimately retained for model construction. Among the evaluated models, LightGBM showed the best overall performance. The mean AUC from cross-validation and repeated random split validation was approximately 0.79, indicating moderate discriminative ability and providing the primary estimate of internal generalizability. In the single held-out internal test set, LightGBM achieved an AUC of 0.9468 (95% CI: 0.897–0.992), although this result was interpreted cautiously because of the limited sample size and small number of positive events. The model also showed a relatively low Brier score of 0.061 and favorable net benefit on decision curve analysis within clinically relevant threshold ranges. SHAP analysis indicated that age was the most influential predictor of MINS.

Conclusions

This single-center study developed and internally validated a preoperative machine learning model for predicting myocardial injury after hip replacement surgery, which may support early risk stratification before surgery.

Clinical trial number

Not applicable.

Supplementary Information

The online version contains supplementary material available at https://doi.org/10.1186/s12911-026-03701-z.

Keywords: Hip replacement, LightGBM, Machine learning, Myocardial injury, Prediction model

Introduction

With the acceleration of global population aging and the continuous increase in the prevalence of degenerative diseases such as osteoarthritis, hip replacement surgery has become a core surgical method for restoring joint function and improving the quality of life of middle-aged and elderly patients [1–3]. However, the physiological stress, fluid shifts, and potential inflammatory responses accompanying the perioperative period of hip replacement surgery—commonly performed for osteoarthritis, femoral neck fracture, or osteonecrosis, and predominantly as elective procedures—pose a high risk of cardiovascular events, particularly in middle-aged and elderly patients with multiple comorbidities [4, 5]. Among them, postoperative myocardial injury, as one of the common serious complications, is not only closely related to prolonged hospital stay and increased medical costs, but also an important predictor of short-term and long-term mortality for patients. Recent large cohort studies and systematic reviews have shown that myocardial injury after noncardiac surgery (MINS) is a common and clinically significant outcome in patients undergoing hip replacement and other major noncardiac surgeries, being strongly associated with increased short-term mortality and adverse cardiovascular events [6–8]. In the landmark cohort study on vascular events in non-cardiac surgery patients, the incidence of MINS was 19.8% [9]. And studies have suggested that the attributable fraction (AF) of postoperative mortality (that is, the percentage of deaths in this cohort that would be attributed to each complication if the causal relationship were true) shows that the AF associated with postoperative MINS is 14.4% [10]. Currently, the clinical identification of postoperative myocardial injury mainly relies on postoperative troponin monitoring and changes in electrocardiogram, but its mechanism is complex and is influenced by multiple factors such as age, baseline cardiac function, and surgical duration interactively. Traditional risk assessment tools (such as the Revised Cardiac Risk Index) often have insufficient sensitivity or limited specificity when predicting individualized postoperative myocardial injury risk [11–13]. In particular, the RCRI, while originally developed to predict major cardiac complications in patients undergoing major noncardiac surgery, has only moderate predictive performance for MINS, especially in elderly orthopedic patients with multiple comorbidities. In these patients, MINS often manifests as subtle or asymptomatic troponin elevation rather than overt clinical events, which further limits the sensitivity of RCRI. Studies have reported that its discriminatory ability, measured by the area under the curve (AUC), ranges from approximately 0.63 to 0.70 in noncardiac surgical populations, and is further reduced in elderly, multi-comorbidity orthopedic patients [14, 15].

These observations highlight the limitations of traditional risk assessment tools and the need for more individualized and dynamic prediction methods. Machine learning algorithms, capable of efficiently processing high-dimensional and nonlinear clinical data and capturing complex interactions among variables, offer a promising approach for more accurate perioperative risk stratification. Currently, there have been studies that have applied machine learning to predict the prognosis of orthopedic surgeries, but the machine learning prediction model focusing on postoperative myocardial injury in middle-aged and elderly hip replacement patients has not yet been established [16–18]. This study aimed to systematically develop and internally validate a machine learning model for predicting postoperative myocardial injury in middle-aged and elderly patients undergoing hip replacement surgery using strictly preoperative multidimensional clinical variables. The model was designed as a preoperative prediction tool to support early risk stratification before surgery, thereby helping clinicians identify high-risk patients, optimize anesthetic planning, strengthen intraoperative hemodynamic management, guide postoperative monitoring strategies including early troponin assessment, and enable more individualized perioperative management.

Materials and methods

Data sources

The flowchart of this research is shown in Fig. 1. A total of 625 patients undergoing hip arthroplasty were initially screened between January 2021 and December 2024 at our hospital. The relevant clinical data were systematically reviewed and extracted from the hospital’s electronic medical record system. After applying the predefined inclusion and exclusion criteria, 453 middle-aged and elderly patients were included in the final analysis.

Fig. 1.

Fig. 1

Study workflow for patient selection, feature selection, model construction, and evaluation. The upper part of the figure shows patient screening and exclusions. The cohort included patients undergoing elective hip arthroplasty for osteoarthritis, femoral neck fracture, or osteonecrosis; patients with prior hip arthroplasty or undergoing revision surgery were excluded. Candidate predictors in the primary analysis included only preoperative baseline characteristics, laboratory variables, and echocardiographic parameters, while intraoperative and postoperative variables were not included in feature selection or model development. The final cohort was randomly divided into a training cohort and a test cohort. Feature selection was performed using recursive feature elimination (RFE), followed by model construction with nine machine learning algorithms. Model performance was evaluated using AUC, accuracy, sensitivity, specificity, F1 score, Brier score, ROC curves, calibration curves, decision curve analysis (DCA), and SHAP

Inclusion criteria for this study: (1) Patients aged 65 years or older; (2) Patients undergoing first-time unilateral elective hip joint replacement surgery, including total hip arthroplasty or hemiarthroplasty; (3) All completed cardiac injury-related indicators (such as cardiac troponin) during the perioperative period (both preoperatively and postoperatively); (4) Having available data for key perioperative variables required for outcome ascertainment, feature selection, and model construction. Exclusion criteria: (1) Patients with acute myocardial infarction or progressive myocardial injury prior to surgery, including cases where troponin elevation was determined to be of non-ischemic origin (e.g., sepsis, pulmonary embolism, myocarditis, tachyarrhythmia, acute renal failure). All such cases were independently reviewed by two experienced clinicians, and if a discrepancy occurred, a third senior clinician made the final determination; (2) Those with severe infections, terminal-stage malignant tumors, or other diseases that may significantly affect short-term prognosis; (3) Patients with a history of prior hip arthroplasty or those undergoing revision surgery; (4) Those with missing or incomplete key perioperative variables that cannot be used for model construction and analysis.

Data preprocessing and feature selection

During the model construction process, the candidate predictive variables were initially screened based on previous literature reports and clinical relevance, and systematically extracted from the electronic medical record system. The variables included in this study mainly fall into the following categories: (1) demographic characteristics: such as age, gender, body mass index (BMI), etc.; (2) past medical history and comorbidities: including hypertension, diabetes, coronary heart disease, cerebrovascular disease, chronic kidney disease, etc.; (3) preoperative laboratory variables, including routine hematological indicators, biochemical indicators, and myocardial injury-related markers, for which only the first test results before surgery were included. Blood sodium was defined as the serum sodium measurement obtained during routine preoperative laboratory testing and (4) echocardiographic parameters, including left ventricular end-diastolic dimension (LVEDD), left atrial medio-lateral dimension (LAMLD), left atrial superior-inferior dimension (LASID), right atrial medio-lateral dimension (RAMLD), right atrial superior-inferior dimension (RASID), ejection fraction (EF), fractional shortening (FS). To avoid information leakage from postoperative data and to ensure consistency between predictor availability and the intended clinical application, only variables available before surgery were included in the primary analysis. Accordingly, candidate predictors consisted of preoperative demographic characteristics, comorbidities, laboratory variables, and echocardiographic parameters, whereas intraoperative and postoperative variables were not used for feature selection or model development in the primary model. The prediction framework was therefore defined as preoperative prediction, with the predictor time window limited to the preoperative assessment period. During data preprocessing, the primary analysis was conducted using a complete-case approach, in which cases with missing values in any candidate variable were excluded. To further evaluate the potential impact of missing data and exclusion of incomplete cases, MICE was performed in the initially screened cohort. After imputation, recursive feature elimination was repeated using the imputed dataset after excluding intraoperative variables, consistent with the predefined preoperative prediction framework. The same eight predictors were retained as in the primary complete-case analysis. These predictors were then used to reconstruct the best-performing model in the MICE-imputed cohort, and model performance was compared with that of the primary complete-case analysis as a sensitivity analysis. The proportion of missing values for each candidate variable was summarized, and the imputed dataset was used for baseline comparison and sensitivity analyses of model performance. Categorical variables were numerically encoded, whereas continuous variables were retained in their original scale without additional standardization or normalization, since most of the evaluated models were tree-based algorithms and therefore relatively insensitive to feature scaling. The resulting variables were then entered into the initial feature set for subsequent feature selection and model development. The primary outcome measure of this study was myocardial injury after hip replacement surgery (MINS). In our institution, perioperative hs-cTn assessment is commonly performed as part of routine perioperative evaluation for middle-aged and elderly patients undergoing hip replacement surgery, particularly for patients with advanced age or cardiovascular risk factors. In this retrospective study, patients were included only if both preoperative and postoperative troponin measurements were available. MINS was defined as evidence of myocardial injury during the perioperative period. Cardiac troponin was measured using a high-sensitivity cardiac troponin (hs-cTn) assay, and the normal reference range in our hospital laboratory was 0–17.5 ng/L. The determination criteria are as follows: (1) The postoperative cardiac troponin (cTn) test value is ≥ 30 ng/L (exceeding the upper limit reference value of the 99th percentile); (2) The absolute value is at least 30 ng/L higher than the preoperative baseline value; (3) There is no situation caused by non-ischemic factors that leads to an increase [8]. In the model construction and analysis, whether MINS occurred is defined as a binary outcome variable, where the occurrence of MINS is regarded as a positive outcome, and the absence of MINS is considered a negative outcome.

During the feature selection stage, recursive feature elimination (RFE) was employed to reduce variable redundancy, improve model generalizability, and lower the risk of overfitting. In the primary analysis, RFE was applied only to candidate predictors available before surgery, in accordance with the preoperative prediction framework. This strategy ensured that the final model could be used for preoperative risk stratification and that the timing of predictor availability was consistent with the intended clinical application. RFE used the Random Forest Classifier as the base learner, with the random seed set to 42 to ensure reproducibility of the feature selection process. Random Forest was selected because of its robustness, ability to capture nonlinear relationships among variables, and relatively stable performance in feature importance estimation, making it suitable for ranking candidate predictors before subsequent model comparison. Specifically, RFE repeatedly trained the random forest model and ranked features according to their importance. In each iteration, the feature contributing least to model performance was removed (n_features_to_select = 1, step = 1), thereby generating a recursive ranking of all candidate variables. To avoid potential data leakage, this procedure was conducted entirely within the training set and combined with 5-fold cross-validation, while the independent test set was not involved in the feature selection process.

As a supplementary feature-selection analysis, the RFE procedure was also repeated using an expanded candidate variable set that additionally included selected intraoperative variables. This analysis was designed to assess whether the inclusion of intraoperative information would influence feature selection and to examine the robustness of the preoperative feature-selection framework. The supplementary analysis was therefore used only to evaluate feature-selection stability and was not intended to redefine the primary model’s clinical application time point.

Model development, evaluation and interpretation

The complete dataset was randomly divided into a training set (70%) and a test set (30%) using stratified sampling to preserve the distribution of outcome events. The training set was used for model development and hyperparameter optimization, while the test set was reserved exclusively for final performance evaluation. Nine machine learning algorithms were constructed and compared, including CatBoost, K-Nearest Neighbors, Bagging, LightGBM, Random Forest, Decision Tree, Voting Classifier, AdaBoost, and XGBoost, with logistic regression included as a conventional linear baseline. The prediction task was formulated as a binary classification problem, with postoperative MINS defined as the positive class. All models were trained and evaluated under this consistent binary classification framework. Hyperparameters were tuned using 10-fold cross-validation within the training set. Grid search was mainly applied to models with relatively small and discrete hyperparameter spaces, whereas randomized search was used for models with larger or higher-dimensional parameter spaces to improve computational efficiency while maintaining broad parameter exploration. Detailed hyperparameter search strategies and parameter ranges are provided in Supplementary Table 1. In addition, repeated random split validation was performed 20 times using stratified random sampling to preserve the distribution of MINS events between the training and test sets in each iteration. The mean and standard deviation of performance metrics across the 20 repeated splits were calculated to further assess the robustness of model performance. In addition, repeated random split validation was performed 20 times using stratified random sampling to preserve the distribution of MINS events between the training and test sets in each iteration. In each repeated split, the models were retrained and re-evaluated, and the mean and standard deviation of performance metrics across the 20 repeated splits were calculated to assess the robustness of model performance. These analyses were primarily intended to assess the stability of model discrimination and threshold-dependent classification performance. Calibration, Brier score, decision curve analysis, and clinical impact curves were evaluated as supplementary exploratory analyses for the final internally developed model and were therefore interpreted cautiously. No additional resampling or class reweighting was applied in the primary analysis. No additional resampling or class reweighting was applied in the primary analysis. Model performance was evaluated using confusion matrices and metrics including accuracy, recall, specificity, the area under the receiver operating characteristic curve (AUC), and the Brier score. Precision–recall curves and the area under the precision–recall curve (AUPRC) were also used to assess performance under class imbalance. The Brier score quantified the discrepancy between predicted probabilities and observed outcomes. The best-performing model was primarily identified based on cross-validated AUC, repeated validation performance, ROC analysis, calibration, and clinical utility. As a supplementary analysis, threshold-dependent classification performance of the final LightGBM model was further evaluated. The Youden index was used as the primary threshold optimization approach to balance sensitivity and specificity. To avoid optimistic bias and potential data leakage, for each repeated random split, the Youden index-derived threshold was determined exclusively within the training set and then applied unchanged to the corresponding held-out test set. The held-out test set was not used at any stage of threshold selection. Fixed thresholds of 0.3 and 0.2 were additionally assessed as exploratory sensitivity-oriented operating points and were not used for model optimization. These threshold analyses were performed to examine whether the relatively low sensitivity observed under the default 0.5 threshold could be improved without modifying the original model training procedure. These supplementary analyses did not alter the predefined primary model development and validation framework.

To assess model interpretability, Shapley Additive Explanations (SHAP) were applied to the final trained LightGBM model in both the training and test sets as a comparative analysis. Feature importance was ranked by the mean absolute SHAP value across samples. Global interpretability was visualized using summary beeswarm plots, whereas local interpretability was demonstrated through force plots and waterfall plots. SHAP decision plots were further used to illustrate the cumulative contribution of features and the model’s decision process at both the individual and cohort levels. The expected value, or base value, represents the average model output, and each SHAP value indicates the contribution of a given feature relative to this baseline. Although SHAP values are expressed in the raw output space, namely log-odds for tree-based classifiers, they can be transformed into predicted probabilities for the positive class using the logistic sigmoid function. To further evaluate the stability of SHAP-derived feature importance across different data partitions, an additional quantitative stability analysis was performed. The LightGBM model was repeatedly trained across 10 random data splits, and SHAP values were calculated for each split. Feature rankings based on mean absolute SHAP values were compared using rank agreement metrics, including Spearman correlation, Kendall’s tau, and top-k overlap. This analysis was used to quantify the consistency of feature importance across repeated partitions, complementing the visual comparison of SHAP patterns between the training and test sets. Overall, these analyses provided complementary global and local explanations of model behavior and allowed assessment of the relative stability of the main model-derived predictors. Finally, clinical impact curves (CICs) were used to examine the distribution of predicted risk across thresholds and to evaluate the model’s ability to identify high-risk individuals, providing additional insight into its potential clinical utility.

Statistical analysis

The complete dataset was divided into a training set and a test set using random stratified sampling. Continuous variables with a normal distribution were expressed as mean ± standard deviation, whereas skewed continuous variables were presented as median (interquartile range). Categorical variables were summarized as frequencies and percentages. Baseline characteristics of the training and test sets were summarized descriptively, and no statistical significance testing was performed, as such comparisons do not affect model development. Baseline characteristics were also compared between the original complete-case dataset and the MICE-imputed dataset to assess whether missing-data handling materially altered the data structure. Based on the training set, key features selected using recursive feature elimination (RFE) were used to develop nine machine learning models, with logistic regression additionally included as a conventional linear baseline model. Hyperparameters were optimized using 10-fold cross-validation to improve model stability and generalizability. Model performance was evaluated using confusion matrices and related metrics, including accuracy, specificity, sensitivity, F1 score, area under the receiver operating characteristic curve (AUC), and Brier score. In addition, sensitivity analyses were conducted by reconstructing the corresponding models using the MICE-imputed dataset, and the results were compared with those of the primary complete-case analysis to assess the robustness of the findings. To further evaluate model stability and reduce the influence of a single random train–test split, repeated random split validation was additionally performed 20 times, with all models re-trained and re-evaluated in each iteration. No additional resampling or class-reweighting strategy was applied. Detailed hyperparameter settings for the nine machine learning algorithms are provided in the Supplementary Table 1. All statistical analyses and model development were performed using R software (version 4.4.2) and Python (version 3.13.4). Python was used for machine learning model training, hyperparameter tuning, repeated validation, and interpretability analysis, including SHAP-based feature importance assessment and clinical impact curve (CIC) plotting.

Results

Baseline characteristics of the population

A total of 453 middle-aged and elderly patients who underwent hip joint replacement surgery were included in this study, of whom 317 were assigned to the training set and 136 to the test set. The baseline characteristics of the two groups are shown in Table 1. The proportion of missing data for each candidate variable is summarized in Supplementary Table 2. To assess the potential impact of excluding incomplete cases, we additionally performed multiple imputation using MICE and compared baseline characteristics between the complete-case dataset and the imputed dataset. Standardized mean differences (SMDs) were used to assess balance between the complete-case and imputed datasets, with an absolute SMD < 0.1 indicating good balance. The major baseline variables showed low SMDs, suggesting good balance between the two datasets (Supplementary Table 3). Overall, the training and test sets showed similar distributions in demographic characteristics, clinical variables, echocardiographic parameters, and intraoperative indicators. In terms of cardiac structure and function, echocardiographic variables were generally well balanced between the two groups. LVEDD, left atrial dimensions (LAMID and LASID), right atrial dimensions, EF, and FS appeared broadly comparable between the training and test sets. The incidence of postoperative MINS was comparable between the training and test sets (21.14% vs. 20.59%).

Table 1.

Baseline characteristics and balance assessment between the training and test cohorts

Variables Total (n = 453) Test (n = 136) Train (n = 317) P
Age, M (Q₁, Q₃) 75.00 (68.00, 82.00) 76.00 (69.00, 83.00) 75.00 (68.00, 81.00) 0.175
BMI, M (Q₁, Q₃) 28.30 (25.50, 31.70) 27.70 (25.70, 31.33) 28.60 (25.40, 31.80) 0.383
Hb, M (Q₁, Q₃) 12.60 (11.60, 13.50) 12.65 (11.50, 13.45) 12.60 (11.70, 13.50) 0.596
LVEDD, M (Q₁, Q₃) 40.10 (32.70, 45.20) 40.0 (33.30, 44.10) 41.30 (34.10, 45.20) 0.753
LAMLD, M (Q₁, Q₃) 38.70 (33.00, 44.00) 38.30 (32.17, 44.45) 38.80 (33.20, 43.70) 0.794
LASID, M (Q₁, Q₃) 52.80 (46.50, 59.90) 52.80 (46.92, 58.46) 52.80 (46.40, 60.20) 0.609
RAMLD, M (Q₁, Q₃) 32.50 (29.00, 37.00) 31.70 (28.00, 36.96) 32.70 (29.20, 37.20) 0.195
RASID, M (Q₁, Q₃) 45.80 (40.90, 52.50) 46.05 (41.00, 52.66) 45.72 (40.80, 52.44) 0.751
EF, M (Q₁, Q₃) 50.20 (46.70, 57.20) 49.73 (45.74, 53.40) 50.89 (45.00, 54.00) 0.061
FS, M (Q₁, Q₃) 33.5 (28.40, 38.90) 32.9 (27.10, 37.50) 33.8 (28.90,39.30) 0.187
Na, M (Q₁, Q₃) 137.80 (131.30, 143.10) 138.50 (132.97, 144.12) 137.50 (130.80, 142.70) 0.097
K, M (Q₁, Q₃) 4.20 (3.90, 4.50) 4.20 (3.90, 4.50) 4.20 (3.90, 4.60) 0.788
TC, M (Q₁, Q₃) 5.49 (4.83, 6.14) 5.57 (4.99, 6.15) 5.42 (4.78, 6.14) 0.274
TG, M (Q₁, Q₃) 2.00 (1.43, 2.78) 2.10 (1.60, 2.90) 1.93 (1.37, 2.72) 0.038
LDL C, M (Q₁, Q₃) 3.48 (2.85, 4.05) 3.40 (2.71, 3.94) 3.50 (2.86, 4.09) 0.145
HDL C, M (Q₁, Q₃) 1.10 (0.89, 1.28) 1.12 (0.90, 1.28) 1.09 (0.89, 1.28) 0.538
Ca, M (Q₁, Q₃) 2.40 (2.27, 2.53) 2.42 (2.30, 2.53) 2.39 (2.27, 2.53) 0.266
Sex, n(%) 0.829
Male 223 (49.23) 68 (50.00) 155 (48.90)
Female 230 (50.77) 68 (50.00) 162 (51.10)
ASA, n(%) 0.838
I 70 (15.45) 20 (14.71) 50 (15.77)
II 227 (50.11) 66 (48.53) 161 (50.79)
III 108 (23.84) 33 (24.26) 75 (23.66)
IV 48 (10.60) 17 (12.50) 31 (9.78)
CAD, n(%) 0.585
No 344 (75.94) 101 (74.26) 243 (76.66)
Yes 109 (24.06) 35 (25.74) 74 (23.34)
Diabetes, n(%) 0.477
No 343 (75.72) 100 (73.53) 243 (76.66)
Yes 110 (24.28) 36 (26.47) 74 (23.34)
Hypertension, n(%) 0.220
No 250 (55.19) 81 (59.56) 169 (53.31)
Yes 203 (44.81) 55 (40.44) 148 (46.69)
Smoking, n(%) 0.457
No 324 (71.52) 94 (69.12) 230 (72.56)
Yes 129 (28.48) 42 (30.88) 87 (27.44)
Drink, n(%) 0.392
No 383 (84.55) 118 (86.76) 265 (83.60)
Yes 70 (15.45) 18 (13.24) 52 (16.40)
Intraop vasoactive use, n(%) 0.887
No 321 (70.86) 97 (71.32) 224 (70.66)
Yes 132 (29.14) 39 (28.68) 93 (29.34)
Result, n(%) 0.896
Non-MINS 358 (79.03) 108 (79.41) 250 (78.86)
MINS 95 (20.97) 28 (20.59) 67 (21.14)

Feature Selection

Feature selection

In accordance with the revised preoperative prediction framework, the model was designed to estimate the risk of myocardial injury after hip replacement surgery using variables available before surgery. The intended application time point was therefore defined as the preoperative assessment period, before the start of surgery and before postoperative myocardial injury had been clinically ascertained. In this setting, the model may support preoperative risk stratification and help guide individualized perioperative management, including anesthetic planning, intraoperative hemodynamic management, and postoperative monitoring strategies. Accordingly, candidate predictors in the primary analysis included only preoperative clinical and laboratory variables, as well as echocardiographic parameters. Intraoperative and postoperative variables were not included in feature selection or model development for the primary model. Feature selection was performed in the training set using recursive feature elimination (RFE) with random forest as the base learner (Fig. 2). This method ranked variables according to their contribution to model performance and iteratively removed less informative features, thereby reducing dimensionality while preserving predictive ability. As the number of retained variables decreased, the average AUC initially increased and then reached a relatively stable level. Based on this performance pattern, eight preoperative features were ultimately selected as the optimal subset for subsequent model construction, including triglycerides (TG), low-density lipoprotein cholesterol (LDL-C), left ventricular end-diastolic dimension (LVEDD), right atrial medio-lateral dimension (RAMLD), blood sodium (Na), age, total cholesterol (TC), and left atrial superior-inferior dimension (LASID). These selected variables were all available before surgery, supporting the interpretation of the final model as a preoperative prediction tool.

Fig. 2.

Fig. 2

Feature importance and model performance based on recursive feature elimination. Feature selection using recursive feature elimination (RFE) with random Forest as the base learner, performed within the training set. Bar plots show the relative importance of candidate features, while the line plot displays the corresponding mean AUC as features were sequentially added. The top eight features contributing most to model performance are highlighted

As a supplementary analysis, we also repeated the RFE procedure using an expanded candidate variable set that additionally included selected intraoperative variables. The same eight predictors were retained, and no intraoperative variables were selected, indicating that the final feature subset was not materially influenced by whether intraoperative variables were considered during feature selection (Supplementary Figure 1). Therefore, the primary model was developed based on these eight preoperative predictors and was interpreted as a preoperative prediction tool.

The development and comparison of predictive models

Based on the selected key features, multiple predictive models were developed in the training set to estimate the risk of myocardial injury after hip replacement surgery, including CatBoost, KNN, Bagging, LightGBM, Random Forest, Decision Tree, Voting classifier, AdaBoost, and XGBoost. Logistic regression was incorporated as a conventional linear baseline model for comparison. To provide a robust estimate of model discrimination and reduce the influence of any single data split, 10-fold cross-validation was performed for each model and was regarded as the primary performance evaluation. The corresponding cross-validation ROC curves are shown in Fig. 3 A–I. Across the cross-validation analyses, the best-performing model achieved a mean AUC of 0.79 ± 0.10, indicating moderate but acceptable discriminative performance across different data subsets. In addition, we compared the performance of the LightGBM model with commonly used clinical risk scores, including the Revised Cardiac Risk Index (RCRI) and ASA classification, within the same cohort. The machine learning model demonstrated superior discriminative performance compared with both RCRI and ASA. Detailed results are provided in Supplementary Table 20. However, the fold-specific AUROC values showed noticeable variability, with some folds achieving relatively high discrimination and others showing lower performance. This variability was considered to reflect uncertainty in internal validation, likely related to the limited number of positive MINS events, moderate class imbalance, patient heterogeneity, and sensitivity to data partitioning. Because cross-validation provides a more conservative and stable estimate of generalizability than a single hold-out test-set evaluation, these results were considered the main performance findings. To further assess the stability of model performance, repeated random split validation was performed 20 times after the primary cross-validation analysis. The corresponding results are provided in Supplementary Tables 6–14. Repeated random split validation was performed using stratified random sampling, and the mean ± standard deviation of performance metrics across the 20 repeated splits are now reported in the Supplementary Tables. Across these repeated splits, LightGBM consistently remained among the best-performing models, although some variability in performance was observed across different data partitions. Its mean AUC remained broadly consistent with the cross-validated AUC, supporting the relative robustness of its discriminative performance. However, under the conventional probability threshold of 0.5, the repeated random split validation showed that LightGBM had relatively low sensitivity despite high specificity, as shown in Supplementary Table 15. This finding suggested that the default threshold may not be optimal for identifying patients at increased risk of postoperative MINS. Given the clinical importance of detecting postoperative MINS cases, additional threshold analysis was performed for the final LightGBM model. The mean Youden index-derived cutoff was 0.274 ± 0.106 across the 20 repeated splits. Compared with the default threshold of 0.5, the Youden-derived threshold markedly improved sensitivity and reduced false negatives (FN), but decreased specificity and positive predictive value (PPV) and increased false positives (FP). The fixed thresholds of 0.3 and 0.2 showed similar sensitivity-oriented trade-offs, with higher sensitivity and negative predictive value (NPV) but lower specificity and PPV than the default threshold. Classification performance under the default threshold, the Youden index-derived threshold, and the fixed thresholds of 0.3 and 0.2 is provided in Supplementary Tables 15–18. To further support clinical interpretation, Supplementary Table 19 summarizes the threshold-dependent screening burden, including the number of patients classified as high risk, detected MINS cases, missed MINS cases, and false-positive classifications at clinically relevant thresholds. Because AUC is threshold-independent, the AUC remained unchanged after threshold adjustment, whereas threshold-dependent classification performance varied according to the selected operating point. After these cross-validation and repeated validation analyses, each model was retrained on the full training set and subsequently evaluated on the held-out internal test set as a secondary hold-out assessment. Accordingly, the cross-validated ROC curves were intended to reflect the primary estimate of model discrimination and stability, whereas the held-out test-set ROC curves were included to provide an additional evaluation of model performance under a single hold-out partition.The overall performance of different models in the training and test sets is presented in Fig. 4 A and B. ROC curves for the single held-out internal test set are shown in Fig. 5D, and the corresponding AUC values are summarized in Table 2. In this single test-set evaluation, LightGBM achieved the highest AUC among all models, with an AUC of 0.947 (95% CI: 0.897–0.992), followed by Bagging, CatBoost, Random Forest, and XGBoost. However, given the lower and more conservative cross-validation and repeated random split validation results, this high test-set AUC was interpreted cautiously and was not used as the sole basis for model selection. PR curves were also generated to provide additional assessment under class imbalance, with results shown in Supplementary Figure 3. Consistent with the test-set AUC findings, LightGBM achieved the highest AUPRC in both the training and test sets, with AUPRC values of 0.895 and 0.921, respectively. These PR-curve findings were interpreted as complementary to the primary cross-validation analysis. For comparison, logistic regression achieved AUC values of 0.789 in the training set and 0.703 in the test set, and its ROC curves are shown in Supplementary Figure 2. Pairwise DeLong tests were then performed to compare ROC curves among models in the single held-out internal test set, and the results are shown in Table 3. These comparisons suggested favorable discrimination of LightGBM in the hold-out test set. Nevertheless, because the DeLong analyses were based on a single test split, they were interpreted as supportive rather than definitive evidence of model superiority. In addition to discrimination, classification metrics including accuracy, sensitivity, specificity, and F1 score were comprehensively evaluated, as shown in Fig. 4 and Table 2. In the test set, LightGBM showed a Brier score of 0.061, indicating reasonable agreement between predicted probabilities and observed outcomes (Fig. 5E). Decision curve analysis demonstrated that LightGBM provided a higher net clinical benefit than default strategies across a threshold probability range of approximately 0.1–0.7 (Fig. 5C and F). Because the calibration, Brier score, decision curve analysis, and clinical impact curve findings were mainly based on the final internally developed model and internal data, these results should be interpreted as exploratory rather than definitive evidence of clinical benefit. However, because postoperative MINS screening is more likely to involve lower risk thresholds in clinical practice, we further quantified the expected screening burden at fixed thresholds of 0.3 and 0.2. Based on the repeated held-out test sets, a threshold of 0.3 classified approximately 44 patients as high risk, detected approximately 21 MINS cases, and missed approximately 7 MINS cases. A threshold of 0.2 classified approximately 54 patients as high risk, detected approximately 22 MINS cases, and missed approximately 6 MINS cases. These threshold-dependent estimates are summarized in Supplementary Table 19 and suggest that lower thresholds may reduce missed MINS cases but increase the number of patients requiring additional screening or closer monitoring. Considering its overall performance in cross-validation, repeated random split validation, discrimination, calibration, threshold-optimized classification performance, and decision curve analysis, the best-performing model was selected for predicting the risk of myocardial injury after hip replacement surgery. After MICE imputation in the initially screened cohort, recursive feature elimination was repeated after excluding intraoperative variables, consistent with the predefined preoperative prediction framework. The same eight predictors were retained as in the primary complete-case analysis. Sensitivity analysis using the MICE-imputed cohort showed broadly comparable performance to the complete-case analysis, indicating that the main findings were not materially affected by missing-data handling or exclusion of incomplete cases (Supplementary Table 5). Overall, the performance of the best-performing model in the imputed dataset remained consistent with that observed in the original analysis, supporting the robustness of the findings (Supplementary Table 4). The final model retained 8 predictors, and the approximate events-per-variable was around 11–12 based on the observed number of MINS events in the cohort.

Fig. 3.

Fig. 3

ROC curves based on ten-fold cross-validation for different machine learning models. Panels (A–I) present the ROC curves obtained from ten-fold cross-validation for each model: (A) CatBoost, (B) k-nearest neighbors (KNN), (C) Bagging, (D) Random Forest, (E) LightGBM, (F) Voting classifier, (G) decision tree (DT), (H) AdaBoost, and (I) XGBoost. The bold curve represents the mean ROC curve across folds, and the shaded area indicates variability. These cross-validated ROC curves were used as the primary assessment of model discrimination and stability across different data partitions

Fig. 4.

Fig. 4

Performance comparison of different machine learning models in the training and test sets. (A) Performance metrics of nine machine learning models in the training set. (B) Performance metrics of the same models in the test set.Model performance was evaluated using accuracy, sensitivity, specificity, area under the ROC curve (AUC), and F1 score

Fig. 5.

Fig. 5

Comprehensive performance evaluation of machine learning models in the training and test sets. (A, D) ROC curve comparisons of different models in the training set and single held-out internal test set. These ROC curves represent secondary hold-out evaluation. (B, E) Calibration curves of the models in the training set and test set. (C, F) Decision curve analysis (DCA) of the models in the training set and test set, illustrating the net clinical benefit across a range of threshold probabilities

Table 2.

Comparative analysis of the performance outcomes across various machine learning models

Data set Model Accuracy Sensitivity Specificity F1 AUC
Train Catboost 0.9054 0.9600 0.9051 0.7945 0.9415
KNN 0.7634 0.6842 0.7685 0.2574 0.7746
Bagging 0.8738 0.8750 0.8736 0.7101 0.9407
Light GBM 0.9180 0.8684 0.9336 0.8354 0.9419
Random Forest 0.9148 0.9231 0.9127 0.8163 0.9461
Desicion Tree 0.7918 0.6905 0.8073 0.4677 0.7544
Votingclassfier 0.8423 0.8333 0.8439 0.6154 0.8612
AdaBoost 0.7729 0.7500 0.7744 0.2941 0.8327
XGBoost 0.9306 0.8947 0.9419 0.8608 0.9451
Logistic Regression 0.7161 0.7945 0.6926 0.5631 0.7886
Test Catboost 0.9118 0.9062 0.9009 0.8000 0.9332
KNN 0.7794 0.8571 0.7752 0.2857 0.7618
Bagging 0.8529 0.8571 0.8522 0.6429 0.9383
Light GBM 0.9265 0.9032 0.9333 0.8485 0.9468
Random Forest 0.8971 0.8889 0.8991 0.7742 0.9315
Desicion Tree 0.7941 0.7692 0.7967 0.4167 0.6881
Votingclassfier 0.8456 0.8500 0.8448 0.6182 0.8662
AdaBoost 0.7868 0.7143 0.7951 0.4082 0.7952
XGBoost 0.9191 0.9000 0.9245 0.8308 0.9259
Logistic Regression 0.6397 0.6818 0.6196 0.5504 0.7033

Table 3.

DeLong test for nine machine-learning models

Model 1 Model 2 AUC1 AUC2 Difference Z-value P
Catboost KNN 0.942 0.775 0.167 9.879 0.000
Catboost Bagging 0.942 0.941 0.001 0.046 0.963
Catboost LightGBM 0.942 0.942 0.000 (0.025) 0.980
Catboost Random Forest 0.942 0.946 0.005 (0.273) 0.785
Catboost DT 0.942 0.754 0.187 11.077 0.000
Catboost Votingclassfier 0.942 0.861 0.080 4.751 0.000
Catboost AdaBoost 0.942 0.833 0.109 6.439 0.000
Catboost XGBoost 0.942 0.945 0.004 0.212 0.832
KNN Bagging 0.775 0.941 0.166 5.000 0.000
KNN LightGBM 0.775 0.942 0.167 5.036 0.000
KNN Random Forest 0.775 0.946 0.172 5.162 0.000
KNN DT 0.775 0.754 0.020 0.609 0.542
KNN Votingclassfier 0.775 0.861 0.087 (2.607) 0.009
KNN AdaBoost 0.775 0.833 0.058 (1.749) 0.080
KNN XGBoost 0.775 0.945 0.170 (5.131) 0.000
Bagging LightGBM 0.941 0.942 0.001 (0.081) 0.935
Bagging Random Forest 0.941 0.946 0.005) (0.366) 0.714
Bagging DT 0.941 0.754 0.186 12.638 0.000
Bagging Votingclassfier 0.941 0.861 0.080 5.391 0.000
Bagging AdaBoost 0.941 0.833 0.108 7.324 0.000
Bagging XGBoost 0.941 0.945 0.004 0.296 0.768
LightGBM Random Forest 0.942 0.946 0.004 0.257 0.797
LightGBM DT 0.942 0.754 0.188 11.450 0.000
LightGBM Votingclassfier 0.942 0.861 0.081 4.926 0.000
LightGBM AdaBoost 0.942 0.833 0.109 6.667 0.000
LightGBM XGBoost 0.942 0.945 0.003 0.193 0.847
Random Forest DT 0.946 0.754 0.192 12.913 0.000
Random Forest Votingclassfier 0.946 0.861 0.085 5.716 0.000
Random Forest AdaBoost 0.946 0.833 0.113 7.636 0.000
Random Forest XGBoost 0.946 0.945 0.001 0.070 0.944
DT Votingclassfier 0.754 0.861 0.107 2.908 0.004
DT AdaBoost 0.754 0.833 0.078 2.132 0.033
DT XGBoost 0.754 0.945 0.191 5.190 0.000
Votingclassfier AdaBoost 0.861 0.833 0.029 1.144 0.253
Votingclassfier XGBoost 0.861 0.945 0.084 3.364 0.001
AdaBoost XGBoost 0.833 0.945 0.112 4.320 0.000

Explanation of the model

The SHAP method was used to interpret the final LightGBM model (Fig. 6). SHAP values reflect feature contributions to model predictions within a nonlinear framework and should not be interpreted as linear risk relationships or causal effects. In this model, the positive outcome was defined as MINS after hip replacement surgery. Global SHAP analysis showed that age contributed most strongly to the model output, followed by LDL-C, LASID, TG, and LVEDD (Fig. 6A). The SHAP beeswarm plot further illustrates the direction and distribution of feature effects on the predicted probability of MINS (Fig. 6B). These findings represent model-derived prediction patterns within the current dataset. To evaluate the stability of SHAP-derived feature importance, we performed an additional quantitative analysis across 10 random data splits. Feature importance was defined as the mean absolute SHAP value, and rankings were compared across splits. The results showed good consistency, with a mean Spearman correlation of 0.915, mean Kendall’s tau of 0.810, mean top-5 overlap of 88.9%, and mean top-10 overlap of 80.0% (Supplementary Table 21). SHAP analysis in the single held-out internal test set showed generally similar feature importance patterns, with age, lipid-related variables, and cardiac structural parameters remaining the major contributors (Supplementary Figure 4A–B and Supplementary Tables 22–23). Overall, these analyses suggest that the main SHAP-derived predictors were relatively stable across different data partitions, although the findings should be interpreted as model-based explanatory patterns rather than causal relationships.

Fig. 6.

Fig. 6

SHAP-based interpretation of the final predictive model. (A) Global feature importance ranked by mean absolute SHAP values. (B) SHAP summary beeswarm plot showing the distribution and direction of feature effects on model output. (C, D) SHAP force plots illustrating feature contributions for representative individual samples. (E, F) SHAP waterfall plots demonstrating how individual features cumulatively influence the predicted probability for different outcome classes. (G) SHAP decision plot highlighting feature contribution patterns in misclassified samples

At the individual level, SHAP contribution plots and waterfall charts illustrated how the model derived its prediction for MINS in a single patient (Fig. 6C–F). In a patient predicted to have MINS, advanced age (82.0 years) showed the largest contribution to the model output, while LDL-C (2.4 mmol/L), TG (0.63 mmol/L), and a larger LASID (61.4 mm) also contributed to the final prediction in this specific case; a smaller LVEDD (34.1 mm) contributed in the opposite direction. Similarly, in a patient predicted not to have MINS, a different combination of feature values contributed to the model output in that individual. These examples are intended to illustrate how the model integrates feature information at the individual level, rather than to suggest consistent or monotonic effects of specific variables across all patients. Additionally, the SHAP decision plot demonstrated the cumulative contribution process of each feature on the predicted probability of MINS after hip replacement surgery at the sample level (Fig. 6G). It can be observed that the model output changed as the key features were gradually superimposed, and different individuals showed different feature contribution paths when predicting the occurrence or non-occurrence of MINS, reflecting the model’s comprehensive weighing process of multiple clinical variables at the individual level.

Clinical impact curve

To further evaluate the potential clinical utility of the final LightGBM model, clinical impact curves were generated for the training and test sets (Fig. 7A and B). The CIC illustrates the number of patients classified as high risk by the model and the number of true MINS cases among them across different risk thresholds. In both the training and test sets, the number of patients classified as high risk decreased as the threshold increased, while the number of true-positive MINS cases also gradually declined. This pattern illustrates the expected trade-off between broader screening at lower thresholds and more selective identification at higher thresholds. Overall, the CIC provided a visual estimate of the potential screening burden and detected MINS cases across thresholds, supporting the potential usefulness of the model for risk stratification while highlighting the need for cautious threshold selection.

Fig. 7.

Fig. 7

Clinical impact curves of the LightGBM model in the training and test sets. (A) Clinical impact curve in the training set. (B) Clinical impact curve in the test set. The curves show the number of patients classified as high risk and the number of true events across a range of risk thresholds, illustrating the potential clinical utility of the LightGBM model

Discussion

Hip joint replacement surgery has become a core surgical method for restoring joint function and improving the quality of life of middle-aged and elderly patients. However, hip replacement surgery poses unpredictable risks of cardiovascular system diseases for many middle-aged and elderly patients who have other underlying health conditions [1, 19, 20]. In response to this, we constructed a machine learning-based model for predicting myocardial injury after hip replacement surgery in middle-aged and elderly patients. Because the final model was developed using predictors available before surgery, it should be interpreted as a preoperative risk stratification tool. After feature selection using the RFE method, multiple machine learning models were constructed and compared. Among them, LightGBM demonstrated the best overall predictive performance and was selected as the final model. In the single held-out internal test set, LightGBM achieved the highest AUC (0.9468, 95% CI: 0.897–0.992), while also showing favorable classification performance compared with the other evaluated algorithms. Logistic regression was included as a conventional linear baseline model, and the comparative results suggested that the best-performing machine learning model may better capture the complex relationships among predictors in this dataset. In addition, cross-validation and repeated random split validation further supported the relative stability of the LightGBM model, with its mean performance remaining consistently superior to that of the other models. Beyond discrimination, the LightGBM model also showed potentially meaningful clinical utility. However, the calibration, decision curve analysis, and clinical impact curve results were based on internal data and require confirmation in external prospective cohorts. The calibration curve suggested reasonable agreement between predicted probabilities and observed outcomes within the current dataset. Decision curve analysis showed that the model yielded a net clinical benefit over default strategies across threshold probabilities of approximately 0.1–0.7. However, this range was derived from the decision curve and should not be interpreted as a prespecified or universally applicable clinical cutoff range. In the context of postoperative MINS screening, clinically meaningful thresholds are more likely to fall in the lower range, because missing MINS may have serious consequences, whereas additional screening measures such as postoperative troponin testing, electrocardiographic assessment, and closer monitoring are relatively feasible. Consistently, the clinical impact curve illustrated how the number of patients classified as high risk and the number of true MINS cases varied across thresholds, providing an estimate of the potential screening burden and detected cases. To provide a more clinically interpretable assessment, we further evaluated threshold-dependent performance using the Youden index-derived cutoff as the primary optimized threshold and fixed thresholds of 0.3 and 0.2 as exploratory, sensitivity-oriented operating points. As shown in Supplementary Table 19, lower decision thresholds improved sensitivity and reduced false-negative classifications compared with the default threshold of 0.5, but this was accompanied by lower specificity, lower positive predictive value, and more false-positive classifications. Therefore, lower thresholds may be preferable when avoiding missed MINS cases is prioritized, but they may also increase postoperative testing, monitoring burden, cardiology consultation, prolonged observation, and healthcare resource utilization. Conversely, high thresholds such as 0.7 are unlikely to reflect routine clinical decision-making for MINS screening and should be interpreted only as part of the graphical DCA assessment rather than as clinically recommended decision thresholds. These exploratory thresholds require prospective external validation before clinical implementation. At present, no stable and prospectively validated decision threshold is available, and the current analyses should be interpreted primarily as an evaluation of potential sensitivity–specificity trade-offs rather than as a basis for clinical decision-making. In addition, PR-curve analysis yielded consistent findings, with LightGBM showing the highest AUPRC, further supporting its performance in the presence of moderate outcome imbalance.

Our findings are broadly in line with previous studies that developed predictive models for perioperative myocardial injury or major cardiac complications using traditional statistical methods and machine learning approaches. Previous multivariable models incorporating clinical and laboratory variables have reported AUC values of approximately 0.73–0.79, generally outperforming conventional risk indices such as the RCRI and ASA classification [21, 22]. Machine learning models based on gradient boosting methods have also shown promising discrimination in heterogeneous noncardiac surgical populations. In elderly hip surgery cohorts, interpretable machine learning models have achieved AUROC values around 0.86, further supporting the applicability of ML-based methods in orthopedic perioperative risk stratification [23]. Against this background, the present LightGBM model showed strong predictive performance in the current cohort and adds to the growing evidence that machine learning may be useful for individualized preoperative cardiovascular risk stratification and individualized perioperative management. Importantly, when directly compared within the same cohort, the machine learning model demonstrated superior discriminative performance compared with commonly used clinical risk scores, including the Revised Cardiac Risk Index (RCRI) and ASA classification, suggesting potential incremental value over traditional scoring systems.

The core predictors retained in the final model, including TG, LDL-C, TC, LVEDD, LASID, RAMLD, blood sodium, and age, together captured prediction patterns associated with postoperative myocardial injury in middle-aged and elderly patients undergoing hip joint replacement. By integrating metabolic, structural, and demographic information, the model may help identify patients with a higher predicted risk of postoperative MINS. SHAP analysis further showed that age made the greatest contribution to the model output, followed by lipid-related variables and cardiac structural parameters, while the corresponding patterns in the single held-out internal test were broadly consistent with those observed in the training set. Among these predictors, lipid-related variables, including TG, LDL-C, and TC, were identified as important contributors. This is generally consistent with the established role of dyslipidemia in cardiovascular risk. Hyperlipidemia is closely related to atherosclerosis and may also influence myocardial tolerance to perioperative stress through mechanisms involving endothelial dysfunction, oxidative stress, and inflammatory activation [24–26]. In the setting of major surgery, where trauma, hemodynamic fluctuation, and fluid shifts may impose substantial physiological stress, such metabolic information may be relevant to preoperative risk estimation.

Echocardiographic variables reflecting cardiac structure, including LVEDD, LASID, and RAMLD, also contributed importantly to the final model. Their retention suggests that pre-existing structural cardiac information may provide clinically relevant signals for perioperative risk assessment in this population. This finding supports the potential value of incorporating systematic echocardiographic information into preoperative evaluation, particularly in elderly patients with a substantial burden of cardiovascular comorbidity [27–30].

Blood sodium was another feature retained in the final model, suggesting that preoperative metabolic and fluid-electrolyte status may also be relevant to risk stratification. Inappropriate perioperative fluid management may contribute to or aggravate electrolyte disturbances [31, 32], and sodium may therefore serve as a clinically meaningful indicator within perioperative assessment. In addition, age made a prominent contribution to the model output, which is in line with epidemiological evidence showing that older patients often have reduced cardiovascular reserve and a greater burden of multimorbidity [3, 33–35]. These characteristics may increase vulnerability to perioperative stress and postoperative cardiovascular complications.

Taken together, this study developed a machine learning model for predicting myocardial injury after hip replacement surgery in middle-aged and elderly patients by integrating multidimensional preoperative clinical information. Compared with traditional scoring approaches, the model has the potential to capture more complex nonlinear relationships among predictors [36], and may provide a useful tool for preoperative risk stratification and individualized perioperative management in this population.

Research limitations

This study has several limitations. First, this was a single-center retrospective study with a limited sample size, which may have introduced selection bias and constrained the generalizability of the findings. In addition, because perioperative troponin testing was not mandated by a prospective study protocol for all hip replacement patients, surveillance or verification bias cannot be completely excluded. Although the model was developed using only preoperative variables to match its intended clinical application, external validation in larger, multicenter prospective cohorts is still required. Second, the number of positive MINS events was relatively limited, and the outcome distribution was moderately imbalanced. Although the final model retained 8 predictors and the approximate events-per-variable was around 11–12 in the overall cohort, the analysis remained statistically constrained. Clinical heterogeneity, limited outcome events, moderate class imbalance, and sensitivity of machine learning models to data partitioning in small datasets may have contributed to variability across cross-validation folds. Therefore, the cross-validated performance should be regarded as a conservative estimate of internal model performance, whereas the high AUC observed in the single held-out test set should not be overinterpreted. Although cross-validation and repeated random split validation were used to provide more stable estimates of internal performance, repeated feature selection, calibration, Brier score, decision curve analysis, and clinical impact curves were not summarized across all resampling iterations. Accordingly, these findings should be interpreted as internal robustness and exploratory clinical-utility assessments rather than definitive evidence of generalizability or clinical implementation readiness. Importantly, although we additionally compared the machine learning model with established clinical risk scores (RCRI and ASA classification), these comparisons were conducted within a single-center retrospective dataset and therefore may not fully reflect performance differences in external populations. Third, the threshold analyses were exploratory in nature. The variability of the Youden index-derived threshold across repeated data splits and the absence of prospective external validation mean that no clinically established decision threshold can currently be recommended. Fourth, missing data may have affected the study findings. The primary analysis used a complete-case approach, which may introduce selection bias if the missingness mechanism is not completely random. Although MICE-based sensitivity analysis was performed in the initially screened cohort and showed broadly consistent results, the retrospective single-center design, exclusion of incomplete cases in the primary analysis, and possibility of non-random missingness mean that selection bias cannot be fully excluded. Fifth, although the model incorporated echocardiographic structural parameters, more refined functional indicators, such as myocardial strain and diastolic function parameters, were unavailable. In addition, several final predictors were derived from echocardiography, which may not be routinely accessible in all healthcare settings. Future studies should validate the model externally and explore simplified models based on more widely available clinical variables.

Conclusions

This study developed and internally validated a machine learning model for predicting myocardial injury after hip replacement surgery in middle-aged and elderly patients. The model showed promising predictive performance and may assist preoperative risk stratification and individualized perioperative management; however, prospective validation in large-scale multicenter cohorts is still required before broader clinical application.

Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary Material 1 (4.2MB, docx)

Acknowledgements

Not applicable.

Authors’ contributions

All authors contributed to the study conception and design. Material preparation, data collection and analysis were performed by Yan Huang, Dadong Han, and Tonglin Xia. The first draft of the manuscript was written by Yan Huang. And all authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.

Funding

Not applicable.

Data availability

The datasets generated during and/or analyzed during the current study are available from the corresponding author.

Declarations

Ethics approval and consent to participate

This study was reviewed and approved by the Ethics Committee of Wuhan Third Hospital. All patients were informed of the risks and provided written informed consent before receiving any treatment. The research methods strictly follow the relevant ethical requirements and regulations of the Helsinki Declaration.

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.

Contributor Information

Dadong Han, Email: 2925751432@qq.com.

Tonglin Xia, Email: 15629074081@163.com.

References

  • 1.Frydendal T, Christensen R, Mechlenburg I, Mikkelsen LR, Varnum C, Graversen AE, et al. Total hip replacement or resistance training for severe hip osteoarthritis. N Engl J Med. 2024;391(17):1610–20. 10.1056/NEJMoa2400141. [DOI] [PubMed] [Google Scholar]
  • 2.Günther KP, Deckert S, Lützner C, Lange T, Schmitt J, Postler A. Total hip replacement for osteoarthritis-evidence-based and patient-oriented indications. Deutsches Ärzteblatt Int. 2021;118(43):730–36. 10.3238/arztebl.m2021.0323. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Lenguerrand E, Ben-Shlomo Y, Rangan A, Beswick A, Whitehouse MR, Deere K, et al. Inequalities in provision of hip and knee replacement surgery for osteoarthritis by age, sex, and social deprivation in England between 2007–2017: a population-based cohort study of the National joint Registry. PLoS Med. 2023;20(4):e1004210. 10.1371/journal.pmed.1004210. [DOI] [PMC free article] [PubMed]
  • 4.Taylor-Williams O, Inderjeeth CA, Almutairi KB, Keen H, Preen DB, Nossent JC. Total hip replacement in patients with rheumatoid arthritis: trends in incidence and complication rates over 35 years. Rheumatol Ther. 2022;9(2):565–80. 10.1007/s40744-021-00414-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Alajji M, Erard J, Ferreboeuf B, Fessy MH, Viste A. Risk factors for complications and readmission after total hip or knee replacement with ERAS. Orthop & Traumatol: Surg & Res. 2025;111(4):104177. 10.1016/j.otsr.2025.104177. [DOI] [PubMed] [Google Scholar]
  • 6.Thomas S, Borges F, Bhandari M, De Beer J, Urrútia Cuchí G, Adili A, et al. Association between myocardial injury and cardiovascular outcomes of Orthopaedic surgery: a Vascular events in noncardiac surgery patients cohort evaluation (VISION) Substudy. J Bone Joint Surg Am Volume. 2020;102(10):880–88. 10.2106/JBJS.18.01305. [DOI] [PubMed] [Google Scholar]
  • 7.Botto F, Alonso-Coello P, Chan MT, Villar JC, Xavier D, Srinathan S, et al. Myocardial injury after noncardiac surgery: a large, international, prospective cohort study establishing diagnostic criteria, characteristics, predictors, and 30-day outcomes. Anesthesiology. 2014;120(3):564–78. [DOI] [PubMed] [Google Scholar]
  • 8.Ruetzler K, Smilowitz NR, Berger JS, Devereaux PJ, Maron BA, Newby LK, et al. Diagnosis and management of patients with myocardial injury after noncardiac surgery: a Scientific statement from the American heart Association. Circulation. 2021;144(19):e287–305. 10.1161/CIR.0000000000001024. [DOI] [PubMed]
  • 9.Spence J, LeManach Y, Chan MTV, Wang CY, Sigamani A, Xavier D, et al. Association between complications and death within 30 days after noncardiac surgery. CMAJ: Can Med Assoc J = J de l’Assoc Medicale Canadienne. 2019;191(30):E830–e837. 10.1503/cmaj.190221. [DOI] [PMC free article] [PubMed]
  • 10.Park LJ, Borges FK, Ofori S, Nenshi R, Jacka M, Heels-Ansdell D, et al. Association between complications and death within 30 days after general surgery: a Vascular event in noncardiac surgery patients cohort evaluation (VISION) Substudy. Ann Surg. 2025;282(6):1007–13. 10.1097/SLA.0000000000006372. [DOI] [PubMed] [Google Scholar]
  • 11.Shih NC, Yeh HW, Yang SF, Huang JY, Tsai PK, Yeh CB. Long-term risk of all-cause mortality and major adverse cardiovascular events in hip osteoarthritis patients after total hip replacement. Ann Epidemiol. 2025;111:65–73. 10.1016/j.annepidem.2025.09.018. [DOI] [PubMed] [Google Scholar]
  • 12.Poole KES, Burkov IS, Treece GM, Gee AH, Johannesdottir F, D’Amore S, et al. The clinical utility of imaging in osteoarthritis and its importance in future prediction of total hip replacement; a nested case-control study within the AGES-Reykjavik cohort. J Bone Min Res. 2025. [DOI] [PMC free article] [PubMed]
  • 13.Hakami IA, Altammar MA, Alaklabi SA, Alotaibi MM, Almunyif SN, Alshuwaier MI, et al. Thromboembolic risk after total hip replacement versus hemiarthroplasty in femoral neck fracture patients: a systematic review and meta-analysis. Medicina (Kaunas, Lithuania). 2025;61(11):1929. 10.3390/medicina61111929. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Andersson C, Wissenberg M, Jørgensen ME, Hlatky MA, Mérie C, Jensen PF, et al. Age-specific performance of the revised cardiac risk index for predicting cardiovascular risk in elective noncardiac surgery. Circ: Cardiovasc Qual Outcomes. 2015;8(1):103–08. 10.1161/CIRCOUTCOMES.114.001298. [DOI] [PubMed] [Google Scholar]
  • 15.Roshanov PS, Sessler DI, Chow CK, Garg AX, Walsh MW, Lam NN, et al. Predicting myocardial injury and other cardiac complications after elective noncardiac surgery with the Revised cardiac risk index: the VISION study. Can J Cardiol. 2021;37(8):1215–24. 10.1016/j.cjca.2021.03.015. [DOI] [PubMed] [Google Scholar]
  • 16.Muscato F, Corti A, Manlio Gambaro F, Chiappetta K, Loppini M, Corino VDA. Combining deep learning and machine learning for the automatic identification of hip prosthesis failure: development, validation and explainability analysis. Int J Med Inf. 2023;176:105095. 10.1016/j.ijmedinf.2023.105095. [DOI] [PubMed] [Google Scholar]
  • 17.Huber M, Kurz C, Leidl R. Predicting patient-reported outcomes following hip and knee replacement surgery using supervised machine learning. BMC Med Inf Decis Mak. 2019;19(1):3. 10.1186/s12911-018-0731-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Michelsen C, Jørgensen CC, Heltberg M, Jensen MH, Lucchetti A, Petersen PB, et al. Machine-learning vs. logistic regression for preoperative prediction of medical morbidity after fast-track hip and knee arthroplasty—a comparative study. BMC Anesthesiol. 2023;23(1):391. 10.1186/s12871-023-02354-z. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Zaballa E, Dennison E, Walker-Bone K. Function and employment after total hip replacement in older adults: a narrative review. Maturitas. 2023;167:8–16. 10.1016/j.maturitas.2022.09.005. [DOI] [PubMed] [Google Scholar]
  • 20.Jensen TM, Pedersen JK, Waldorff FB, Søndergaard J, Overgaard S, Christensen K. Trends in incidence of hip fracture and hip replacement in Denmark & comma; 1996 to 2018. JAMA Network Open. 2024;7(5):e249186. [DOI] [PMC free article] [PubMed]
  • 21.Oh AR, Park J, Shin SJ, Choi B, Lee JH, Lee SH, et al. Prediction model for myocardial injury after non-cardiac surgery using machine learning. Sci Rep. 2023;13(1):1475. 10.1038/s41598-022-26617-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Meister R, Puelacher C, Glarner N, Gualandro DM, Andersson HA, Pargger M, et al. Prediction of perioperative myocardial infarction/injury in high-risk patients after noncardiac surgery. Eur Heart J Acute Cardiovasc Care. 2023;12(11):729–39. 10.1093/ehjacc/zuad090. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Azzolina D, Cammarota G, Boero E, Berchialla P, Spadaro S, Longhini F, et al. An interpretable machine learning tool for predicting perioperative cardiac events in patients scheduled for hip fracture surgery: insights from the multicenter LUSHIP study. J Anesth Analg Crit Care. 2025;5(1):71. 10.1186/s44158-025-00291-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.van Spil We, Agricola R, Drossaers-Bakker KW, Weinans H, Lafeber FP, van Spil WE. Associations of markers of matrix metabolism, inflammation markers, and adipokines with superior cam deformity of the hip and their relation with future hip osteoarthritis. Osteoarthr Cartil. 2015;23(11):1897–905. 10.1016/j.joca.2015.03.026. [DOI] [PubMed] [Google Scholar]
  • 25.Munugoda IP, Wills K, Cicuttini F, Graves SE, Lorimer M, Jones G, et al. The association between ambulatory activity, body composition and hip or knee joint replacement due to osteoarthritis: a prospective cohort study. Osteoarthr Cartil. 2018;26(5):671–79. 10.1016/j.joca.2018.02.895. [DOI] [PubMed] [Google Scholar]
  • 26.Kunutsor SK, Whitehouse MR, Blom AW. Obesity paradox in joint replacement for osteoarthritis — truth or paradox? GeroScience. 2022;44(2):651–59. 10.1007/s11357-021-00442-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Lian Q, Wang J, Lian Y, Yang Q, Zhao M, Zhang Y. Impact of valvular heart disease on hip replacement: a retrospective nationwide inpatient sample database study. BMC Musculoskelet Disord. 2021;22(1):860. 10.1186/s12891-021-04738-z. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Yang B, Lei Y, Zeng Y, Luo M, Li Z, Lei K, et al. Risk factors for infection in patients undergoing hip replacement: a systematic review and meta-analysis. J Hosp Infect. 2025;160:60–73. 10.1016/j.jhin.2025.02.021. [DOI] [PubMed] [Google Scholar]
  • 29.Fernández-de-Las-Peñas C, Florencio LL, de-la-Llave-Rincón AI, Ortega-Santiago R, Cigarán-Méndez M, Fuensalida-Novo S, et al. Prognostic factors for postoperative chronic pain after knee or hip replacement in patients with knee or hip osteoarthritis: an umbrella review. JCM. 2023;12(20):6624. 10.3390/jcm12206624. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Deere K, Matharu GS, Ben-Shlomo Y, Wilkinson JM, Blom AW, Sayers A, et al. The risk of all-cause mortality, heart outcomes, cancer, and neurodegenerative disorders with cobalt-chrome-containing total hip arthroplasty implants: an analysis of the National joint Registry. Bone Joint J. 2022;104-b(3):359–67. 10.1302/0301-620X.104B3.BJJ-2021-0397.R1. [DOI] [PubMed] [Google Scholar]
  • 31.Gbejuade H, Sambhwani S, Ubsdell RM, Dungey M, Kandiah A, Shyamsundar S. Predicting factors for requiring routine postoperative blood analysis in primary hip and knee arthroplasty: a prospective study. Cureus. 2023;15(5):e39283. [DOI] [PMC free article] [PubMed]
  • 32.Barrett MC, Whitehouse MR, Blom AW, Kunutsor SK. Host-related factors for venous thromboembolism following total joint replacement: a meta-analysis of 89 observational studies involving over 14 million hip and knee replacements. J Orthopaedic Sci: Off J Jpn Orthopaedic Assoc. 2020;25(2):267–75. 10.1016/j.jos.2019.04.003. [DOI] [PubMed] [Google Scholar]
  • 33.Hawley S, Edwards CJ, Arden NK, Delmestri A, Cooper C, Judge A, et al. Descriptive epidemiology of hip and knee replacement in rheumatoid arthritis: an analysis of UK electronic medical records. Semin Arthritis Rheumatism. 2020;50(2):237–44. 10.1016/j.semarthrit.2019.08.008. [DOI] [PubMed] [Google Scholar]
  • 34.Zeng C, Bennell K, Yang Z, Nguyen UDT, Lu N, Wei J, et al. Risk of venous thromboembolism in knee, hip and hand osteoarthritis: a general population-based cohort study. Ann Rheumatic Dis. 2020;79(12):1616–24. 10.1136/annrheumdis-2020-217782. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Bischoff P, Kramer TS, Schröder C, Behnke M, Schwab F, Geffers C, et al. Age as a risk factor for surgical site infections: German surveillance data on total hip replacement and total knee replacement procedures 2009 to 2018. Euro surveillance: bulletin Europeen sur les maladies transmissibles = European communicable disease bulletin. Euro Surveillance : Bull Europeen sur les Mal transmissibles = Eur communicable disease Bull. 2023;28(9). 10.2807/1560-7917.ES.2023.28.9.2200535. [DOI] [PMC free article] [PubMed]
  • 36.Shelley B, Shaw M. Machine learning and preoperative risk prediction: the machines are coming. Br J Anaesth. 2024;133(5):925–30. [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplementary Material 1 (4.2MB, docx)

Data Availability Statement

The datasets generated during and/or analyzed during the current study are available from the corresponding author.


Articles from BMC Medical Informatics and Decision Making are provided here courtesy of BMC

RESOURCES