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

Main Article Content

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. 


Download data is not yet available.

Article Details

How to Cite
Ibrahim, S. W., Djemal, R., Alsuwailem, A., & Gannouni, S. (2017). Electroencephalography (EEG)-based epileptic seizure prediction using entropy and K-nearest neighbor (KNN). Communications in Science and Technology, 2(1). https://doi.org/10.21924/cst.2.1.2017.44
Author Biographies

Sutrisno Warsono Ibrahim, King Saud University

Sutrisno W. Ibrahim currently is a PhD student and research assistant at Electrical Engineering Dept., King Saud University, Saudi Arabia. He gained M.Sc from the same department on Feb 2013. He got his primary education until senior high school at his hometown, Sukoharjo district, Central Java, Indonesia. He received his B.Sc. in Electrical Engineering from Sepuluh Nopember Institute of Technology in 2010. His research interest includes artificial intelligent, computer vision, biomedical engineering, and energy harvesting.

Ridha Djemal, King Saud University

Associate Professor

College of Engineering 
Electrical Engineering Department 
King Saud University

Abdullah Alsuwailem, King Saud University


College of Engineering 
Electrical Engineering Department 
King Saud University

Sofien Gannouni, King Saud University

Assistant Professor

Computer Sciences Department, 
King Saud University


1. 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.

2. 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.

3. 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.

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

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

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

7. 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.

8. 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.

9. 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.

10. 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.

11. 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.

12. 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.

13. 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].

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

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