Electroencephalography (EEG)-based epileptic seizure prediction using entropy and K-nearest neighbor (KNN)

Sutrisno Warsono Ibrahim, Ridha Djemal, Abdullah Alsuwailem, Sofien Gannouni


Epilepsy is known as a brain disorder characterized by recurrent seizures. The development a system that able to predict seizure before its coming has several benefits such as allowing early treatment or even preventing the seizure. In this article, we propose a seizure prediction algorithm based on extracting Shannon entropy from electroencephalography (EEG) signals.  K-nearest neighbor (KNN) method is used to continuously monitor the EEG signals by comparing with normal and pre-seizure baselines to predict the upcoming seizure. Both baselines are continuously updated based on the most recent prediction result using distance-based method. Our proposed algorithm is able to predict correctly 42 from 55 seizures (76 %), tested using up to 570 hours EEG taken from MIT dataset. With its simplicity and fast processing time, the proposed algorithm is suitable to be implemented in embedded system or mobile application that has limited processing resources. 


seizure prediction; adaptive learning; EEG; Shannon entropy; KNN.

Full Text:



N. Tetzlaff and V. Senger, The Seizure Prediction Problem in Epilepsy: Cellular Nonlinear Networks, IEEE Circuits and Systems Magazine, in IEEE Circuits and Systems Magazine, 12 (2012) 8-20.

D.J. Thurman et al; ILAE Commission on, Epidemiology, Standards for epidemiologic studies and surveillance of epilepsy, Epilepsia, vol. 52 (2011), supplement 7, pp. 2–26.

A. Palumbo, F. Amato, B. Calabrese, et al., An embedded system for eeg acquisition and processing for brain computer interface applications, in Wearable and Autonomous Biomedical Devices and Systems for Smart Environment. Heidelberg, Germany: Springer Berlin Heidelberg, 2010, pp. 137–154.

S. Noachtar, J. Rémi, The role of EEG in epilepsy: A critical review, Epilepsy & Behavior, 15 (2009), issue 1, pp. 22-33.

S. Ramgopal et al, Seizure detection, seizure prediction, and closed-loop warning systems in epilepsy, Epilepsy & Behavior, vol. 37 (2014). pp. 291–307.

T.N. Alotaiby et al, EEG seizure detection and prediction algorithms: a survey, EURASIP Journal on Advances in Signal Processing, 2014 (2014):183.

F. Mormann, R. Andrzejak, T. Kreuz, C. Rieke, P. David, C. Elger, and K. Lehnertz, Automated Detection of a Preseizure State Based on a Decrease in Synchronization in Intracranial Electroencephalogram Recordings from Epilepsy Patients, Physical Rev. E, vol. 67 (2003), p. 021912.

S. Wang, W. Chaovalitwongse, and S. Wong, Online Seizure Prediction Using Adaptive Learning Approach, IEEE Transactions on Knowledge and Data Engineering, vol. 25 (2013), pp. 2854-2866.

M. I. Khalid, S. A. Aldosari, S.A. Alshebeili, T. Alotaiby, and F. E Abd El-Samie, Online Adaptive Seizure Prediction Algorithm for Scalp EEG, International Conference on Information and Communication Technology Research (ICTRC) (2015), pp 44-47.

A.J. Gabor, Leach RR, Dowla FU, "Automated seizure detection using a self-organizing neural network.," Electroencephalogr Clin Neurophysiol. 1996 Sep;99(3):257-66.

T.N. Alotaiby, Abd El-Samie, F.E., Alshebeili, S.A., Aljibreen, K.H., Alkhanen, E., Seizure detection with common spatial pattern and support vector machines, International Conference on Information and Communication Technology Research (ICTRC) (2015), pp. 152–155.

S. Ibrahim, K. AlSharabi, R. Djemal, A. Alsuwailem, An Adaptive Learning Approach for EEG-Based Computer Aided Diagnosis of Epilepsy, International Seminar on Intelligent Technology and Its Application (ISITIA), Lombok-Indonesia (2016), pp. 55-60.

A. Goldberger, et al., PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals Circulation, 101 (23):e215-e220. Link to database: http://physionet.org/pn6/chbmit/ [last visited on Sept. 5, 2016].

A. Shoeb, Application of Machine Learning to Epileptic, Seizure Onset Detection and Treatment, Ph.D. Thesis, MIT, USA, 2009.

C.E. Shannon, A mathematical theory of communication, Bell System Technical Journal, vol 27 (1948), issue 3, pp. 379–423.

DOI: http://dx.doi.org/10.21924/cst.2.1.2017.44


  • There are currently no refbacks.

Copyright (c) 2017 Communications in Science and Technology

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International Licensejoomla
visitors View My Stats