BackgroundSelecting features related to postoperative infection following cardiac surgery was highly valuable for effective intervention. We used machine learning methods to identify critical perioperative infection-related variables after mitral valve surgery and construct a prediction model.MethodsParticipants comprised 1223 patients who underwent cardiac valvular surgery at eight large centers in China. The ninety-one demographic and perioperative parameters were collected. Random forest (RF) and least absolute shrinkage and selection operator (LASSO) techniques were used to identify postoperative infection-related variables; the Venn diagram determined overlapping variables. The following ML methods: random forest (RF), extreme gradient boosting (XGBoost), Support Vector Machine (SVM), Gradient Boosting Decision Tree (GBDT), AdaBoost, Naive Bayesian (NB), Logistic Regression (LogicR), Neural Networks (nnet) and artificial neural network (ANN) were developed to construct the models. We constructed receiver operating characteristic (ROC) curves and the area under the ROC curve (AUC) was calculated to evaluate model performance.ResultsWe identified 47 and 35 variables with RF and LASSO, respectively. Twenty-one overlapping variables were finally selected for model construction: age, weight, hospital stay, total red blood cell (RBC) and total fresh frozen plasma (FFP) transfusions, New York Heart Association (NYHA) class, preoperative creatinine, left ventricular ejection fraction (LVEF), RBC count, platelet (PLT) count, prothrombin time, intraoperative autologous blood, total output, total input, aortic cross-clamp (ACC) time, postoperative white blood cell (WBC) count, aspartate aminotransferase (AST), alanine aminotransferase (ALT), PLT count, hemoglobin (Hb), and LVEF. The prediction models for infection after mitral valve surgery were established based on these variables, and they all showed excellent discrimination performance in the test set (AUC > 0.79).ConclusionsKey features selected by machine learning methods can accurately predict infection after mitral valve surgery, guiding physicians in taking appropriate preventive measures and diminishing the infection risk.