BackgroundCervical spondylotic myelopathy (CSM) is a prevalent degenerative condition resulting from spinal cord compression and injury. Laminectomy with posterior spinal fusion (LPSF) is a commonly employed treatment approach for CSM patients. This study aimed to assess the effectiveness of machine learning models (MLMs) in predicting clinical outcomes in CSM patients undergoing LPSF.MethodsA retrospective analysis was conducted on 329 CSM patients who underwent LPSF at our institution from Jul 2017 to Jul 2023. Neurological outcomes were evaluated using the modified Japanese Orthopaedic Association (mJOA) scale preoperatively and at the final follow-up. Patients were categorized into two groups based on clinical outcomes: the favorable group (recovery rates ≥ 52.8%) and the unfavorable group (recovery rates < 52.8%). Potential predictors for poor clinical outcomes were compared between the groups. Four MLMs—random forest (RF), logistic regression (LR), support vector machine (SVM), and k-nearest neighborhood (k-NN)—were utilized to predict clinical outcome. RF model was also employed to identify factors associated with poor clinical outcome.ResultsOut of the 329 patients, 185 were male (56.2%) and 144 were female (43.4%), with an average follow-up period of 17.86 ± 1.74 months. Among them, 267 patients (81.2%) had favorable clinical outcomes, while 62 patients (18.8%) did not achieve favorable results. Analysis using binary logistic regression indicated that age, preoperative mJOA scale, and symptom duration (p < 0.05) were independent predictors of unfavorable clinical outcomes. All models performed satisfactorily, with RF achieving the highest accuracy of 0.922. RF also displayed superior sensitivity and specificity (sensitivity = 0.851, specificity = 0.944). The Area under the Curve (AUC) values for RF, Logistic LR, SVM, and k-NN were 0.905, 0.827, 0.851, and 0.883, respectively. The RF model identified preoperative mJOA scale, age, symptom duration, and MRI signal changes as the most significant variables associated with poor clinical outcomes in descending order.ConclusionsThis study highlighted the effectiveness of machine learning models in predicting the clinical outcomes of CSM patients undergoing LPSF. These models have the potential to forecast clinical outcomes in this patient population, providing valuable prognostic insights for preoperative counseling and postoperative management.