Construction and validation of an algorithm to separate focal and generalised epilepsy using clinical variables: A comparison of machine learning approaches

Epilepsy Behav. 2024 Apr 25:155:109793. doi: 10.1016/j.yebeh.2024.109793. Online ahead of print.

Abstract

Purpose: Epilepsy type, whether focal or generalised, is important in deciding anti-seizure medication (ASM). In resource-limited settings, investigations are usually not available, so a clinical separation is required. We used a naïve Bayes approach to devise an algorithm to do this, and compared its accuracy with algorithms devised by five other machine learning methods.

Methods: We used data on 28 clinical variables from 503 patients attending an epilepsy clinic in India with defined epilepsy type, as determined by an epileptologist with access to clinical, imaging, and EEG data. We adopted a machine learning approach to select the most relevant variables based on mutual information, to train the model on part of the data, and then to evaluate it on the remaining data (testing set). We used a naïve Bayes approach and compared the results in the testing set with those obtained by several other machine learning algorithms by measuring sensitivity, specificity, accuracy, area under the curve, and Cohen's kappa.

Results: The six machine learning methods produced broadly similar results. The best naïve Bayes algorithm contained eleven variables, and its accuracy was 92.2% in determining epilepsy type (sensitivity 92.0%, specificity 92.7%). An algorithm incorporating the best eight of these variables was only slightly less accurate - 91.0% (sensitivity 89.6%, and specificity 95.1%) - and easier for clinicians to use.

Conclusion: A clinical algorithm with eight variables is effective and accurate at separating focal from generalised epilepsy. It should be useful in resource-limited settings, by epilepsy-inexperienced doctors, to help determine epilepsy type and therefore optimal ASMs for individual patients, without the need for EEG or neuroimaging.

Keywords: Algorithm; Epilepsy; Focal epilepsy; Naïve Bayes: Machine learning.