RESUMO
BACKGROUND AND OBJECTIVES: Epilepsy surgery is often delayed. We previously developed machine learning (ML) models to identify candidates for resective epilepsy surgery earlier in the disease course. In this study, we report the prospective validation. METHODS: In this multicenter, prospective, longitudinal cohort study, random forest models were validated at a pediatric epilepsy center consisting of 2 hospitals and 14 outpatient neurology clinic sites and an adult epilepsy center with 2 hospitals and 27 outpatient neurology clinic sites. The models used neurology visit notes, EEG and MRI reports, visit patterns, hospitalizations, and medication, laboratory, and procedure orders to identify candidates for surgery. The models were trained on historical data up to May 10, 2019. Patients with an ICD-10 diagnosis of epilepsy who visited from May 11, 2019, to May 10, 2020, were screened by the algorithm and assigned surgical candidacy scores. The primary outcome was area under the curve (AUC), which was calculated by comparing scores from patients who underwent epilepsy surgery before November 10, 2020, against scores from nonsurgical patients. Nonsurgical patients' charts were reviewed to determine whether patients with high scores were more likely to be missed surgical candidates. Delay to surgery was defined as the time between the first visit that a surgical candidate was identified by the algorithm and the date of the surgery. RESULTS: A total of 5,285 pediatric and 5,782 adult patients were included to train the ML algorithms. During the study period, 41 children and 23 adults underwent resective epilepsy surgery. In the pediatric cohort, AUC was 0.91 (95% CI 0.87-0.94), positive predictive value (PPV) was 0.08 (0.05-0.10), and negative predictive value (NPV) was 1.00 (0.99-1.00). In the adult cohort, AUC was 0.91 (0.86-0.97), PPV was 0.07 (0.04-0.11), and NPV was 1.00 (0.99-1.00). The models first identified patients at a median of 2.1 years (interquartile range [IQR]: 1.2-4.9 years, maximum: 11.1 years) before their surgery and 1.3 years (IQR: 0.3-4.0 years, maximum: 10.1 years) before their presurgical evaluations. DISCUSSION: ML algorithms can identify surgical candidates earlier in the disease course. Even at specialized epilepsy centers, there is room to shorten the time to surgery. CLASSIFICATION OF EVIDENCE: This study provides Class II evidence that a machine learning algorithm can accurately distinguish patients with epilepsy who require resective surgery from those who do not.