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

Victor Patterson, David H Glass, Shambhu Kumar, Sarah Misbah El-Sadig, Inaam Mohamed, Rahba El-Amin, Mamta Singh

Research output: Contribution to journalArticlepeer-review


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.

Original languageEnglish
Article number109793
Pages (from-to)1-8
Number of pages8
JournalEpilepsy & behavior : E&B
Early online date25 Apr 2024
Publication statusPublished online - 25 Apr 2024

Bibliographical note

Publisher Copyright:
© 2024 Elsevier Inc.


  • Epilepsy
  • Focal epilepsy
  • Algorithm
  • Naïve Bayes
  • Machine learning
  • Naïve Bayes: Machine learning


Dive into the research topics of 'Construction and validation of an algorithm to separate focal and generalised epilepsy using clinical variables: A comparison of machine learning approaches'. Together they form a unique fingerprint.

Cite this