top of page

Using Machine Learning tools to predict complications after surgery

Can we use supervised machine learning tools to predict, based on pre-surgery characteristics, which patents will have (severe) complications after the surgery? Using a database of patients who have undergone intracranial tumor surgery, we train and validate a series of supervised machine learning algorithms to predict a possible outcome. Our best performing model outperforms the standard models used in hospitals in terms of AUC. Using this model screening patents before surgery has the potential to decrease complications following the surgery.



Reliable preoperative identification of patients at high risk for early postoperative complications occurring within 24 h (EPC) of intracranial tumor surgery can

improve patient safety and postoperative management. Statistical analysis using machine learning algorithms may generate models that predict EPC better than conventional statistical methods.


To train such a model and to assess its predictive ability.


This cohort study included patients from an ongoing prospective patient registry at a single tertiary care center with an intracranial tumor that underwent elective neurosurgery between June 2015 and May 2017. EPC were categorized based on the Clavien-Dindo classification score. Conventional statistical methods and different machine learning algorithms were used to predict EPC using preoperatively available patient, clinical, and surgery-related variables. The performance of each model was derived from examining classification performance metrics on an out-of-sample test dataset. RESULTS: EPC occurred in 174 (26%) of 668 patients included in the analysis. Gradient boosting machine learning algorithms provided the model best predicting the probability of an EPC. The model scored an accuracy of 0.70 (confidence interval [CI] 0.59-0.79) with an area under the curve (AUC) of 0.73 and a sensitivity and specificity of 0.80 (CI 0.58-0.91) and 0.67 (CI 0.53-0.77) on the test set. The conventional statistical model showed inferior predictive power (test set: accuracy: 0.59 (CI 0.47-0.71); AUC: 0.64; sensitivity: 0.76 (CI 0.64-0.85); specificity: 0.53 (CI 0.41-0.64)).


Using gradient boosting machine learning algorithms, it was possible to create a prediction model superior to conventional statistical methods. While conventional statistical methods favor patients’ characteristics, we found the pathology and surgery related (histology, anatomical localization, surgical access) variables to be better predictors of EPC.


bottom of page