ObjectiveIn this study, we were aimed to identify important variables via machine learning algorithms and predict postoperative delirium (POD) occurrence in older patients.MethodsThis study was to make the secondary analysis of data from a randomized controlled trial. The Boruta function was used to screen relevant basic characteristic variables. Four models including Logistic Regression (LR), K-Nearest Neighbor (KNN), the Classification and Regression Tree (CART), and Random Forest (RF) were established from the data set using repeated cross validation, hyper-parameter optimization, and Smote technique (Synthetic minority over-sampling technique, Smote), with the calculation of confusion matrix parameters and the plotting of Receiver operating characteristic curve (ROC), Precision recall curve (PRC), and partial dependence graph for further analysis and evaluation.ResultsThe basic characteristic variables resulting from Boruta screening included grouping, preoperative Mini-Mental State Examination(MMSE), CHARLSON score, preoperative HCT, preoperative serum creatinine, intraoperative bleeding volume, intraoperative urine volume, anesthesia duration, operation duration, postoperative morphine dosage, intensive care unit (ICU) duration, tracheal intubation duration, and 7-day postoperative rest and move pain score (median and max; VAS-Rest-M, VAS-Move-M, VAS-Rest-Max, and VAS-Move-Max). And Random Forest (RF) showed the best performance in the testing set among the 4 models with Accuracy: 0.9878; Matthews correlation coefficient (MCC): 0.8763; Area under ROC curve (AUC-ROC): 1.0; Area under the PRC Curve (AUC-PRC): 1.0.ConclusionA high-performance algorithm was established and verified in this study demonstrating the degree of POD risk changes in perioperative elderly patients. And the major risk factors for the development of POD were CREA and VAS-Move-Max.