Automatic EEG-based Alertness Classification using Sparse Representation and Dictionary Learning

  • Mohammad Hadra Sultan Qaboos University
  • Iman Abdelrahman
Keywords: Sparse representation, Dictionary learning, optimization, OMP, 1-norm, reconstruction error, EEG, LDA, RF.


Automation of human alertness identification has been widely investigated in recent decades. Many applications can benefit from automatic alertness state identification, such as driver fatigue detection, monotonous task workers' vigilance detection and sleep studies in the medical field.  Many researchers have tried to exploit different types of behavioural aspects in vigilance detection, such as eye movement, head position and facial expression. On the other hand, some biomedical signals like ECG, EEG and heart rhythm are also exploited; however,  there is a consensus of the superiority of EEG signal in alertness classification due to its close relation with different human vigilant states. In this paper, we propose an automatic method for vigilance detection using a single EEG channel along with sparse representation and dictionary learning. We used Discrete Wavelet Packet Transform to extract the features related to different human vigilance states. We use well-known other classifiers to compare the performance of our proposed method. Results of classification with sparse representation and dictionary learning produced better accuracy results than the other methods.


(1) N. Gurudath and H. Bryan Riley, “Drowsy driving detection by EEG analysis using Wavelet Transform and K-means clustering,” Procedia Comput. Sci., vol. 34, pp. 400–409, 2014, doi: 10.1016/j.procs.2014.07.045.

(2) S. Q. University, “No Title.” [Online]. Available:

(3) M. Tageldin, T. Al-Mashaikki, H. Bali, and M. Mesbah, “EEG Sparse Representation Based Alertness States Identification Using Gini Index,” in Neural Information Processing, 2018, pp. 478–488.

(4) Z. Zhang et al., “A vehicle active safety model: Vehicle speed control based on driver vigilance detection using wearable EEG and sparse representation,” Sensors (Switzerland), vol. 16, no. 2, pp. 1–26, 2016, doi: 10.3390/s16020242.

(5) H. Y. H. Yu, H. L. H. Lu, T. O. T. Ouyang, H. L. H. Liu, and B.-L. L. B.-L. Lu, “Vigilance detection based on sparse representation of EEG,” Eng. Med. Biol. Soc. (EMBC), 2010 Annu. Int. Conf. IEEE, vol. 2010, pp. 2439–2442, 2010, doi: 10.1109/IEMBS.2010.5626084.

(6) B. G. Lee, B. L. Lee, and W. Y. Chung, “Mobile healthcare for automatic driving sleep-onset detection using wavelet-based EEG and respiration signals,” Sensors (Switzerland), vol. 14, no. 10, pp. 17915–17936, 2014, doi: 10.3390/s141017915.

(7) J. Shi, X. Liu, Y. Li, Q. Zhang, Y. Li, and S. Ying, “Multi-channel EEG-based sleep stage classification with joint collaborative representation and multiple kernel learning,” J. Neurosci. Methods, vol. 254, pp. 94–101, 2015, doi: 10.1016/j.jneumeth.2015.07.006.

(8) T. L. T. Da Silveira, A. J. Kozakevicius, and C. R. Rodrigues, “Automated drowsiness detection through wavelet packet analysis of a single EEG channel,” Expert Syst. Appl., vol. 55, pp. 559–565, 2016, doi: 10.1016/j.eswa.2016.02.041.

(9) T. L. T. da Silveira, A. J. Kozakevicius, and C. R. Rodrigues, “Single-channel EEG sleep stage classification based on a streamlined set of statistical features in wavelet domain,” Med. Biol. Eng. Comput., vol. 55, no. 2, pp. 343–352, 2017, doi: 10.1007/s11517-016-1519-4.

(10) I. Belakhdar, W. Kaaniche, R. Djemal, and B. Ouni, “Single-channel-based automatic drowsiness detection architecture with a reduced number of EEG features,” Microprocess. Microsyst., vol. 58, no. December 2017, pp. 13–23, 2018, doi: 10.1016/j.micpro.2018.02.004.

(11) “Sleep-EDF Database Expanded v1.0.0.” [Online]. Available: [Accessed: 15-Feb-2020].

(12) “Rechtschaffen, A. and Kales, A. (1968) A Manual of Standardized Terminology, Techniques and Scoring System for Sleep Stages of Human Subjects. Public Health Service, US Government Printing Office, Washington DC. - References - Scientific Research Publishi.” .

(13) A. Kales, A manual of standardized terminology, techniques and scoring system for sleep stages of human subjects. Washington DC: United States Government Printing Office, 1968.

(14) C. T. Lin et al., “EEG-based subject- and session-independent drowsiness detection: An unsupervised approach,” EURASIP J. Adv. Signal Process., vol. 2008, 2008, doi: 10.1155/2008/519480.

(15) M. Y. Gokhale and D. K. Khanduja, “Time Domain Signal Analysis Using Wavelet Packet Decomposition Approach,” Int. J. Commun. Netw. Syst. Sci., 2010, doi: 10.4236/ijcns.2010.33041.

(16) E. J. Stollnitz, T. D. DeRose, and D. H. Salesin, “Wavelets for computer graphics: a primer, part 2,” IEEE Comput. Graph. Appl., no. September, 1995, doi: 10.1109/38.391497.

(17) A. Kozakevicius and A. A. Schmidt, “Wavelet transform with special boundary treatment for 1D data,” Comput. Appl. Math., vol. 32, no. 3, pp. 447–457, Oct. 2013, doi: 10.1007/s40314-013-0050-6.

(18) I. Daubechius, “Ten Lectures of Wavelets,” Philadelphia, PASosiety Ind. Appl. Math. Anal., pp. 1544–1576, 1992, doi: 10.1137/1.9781611970104.

(19) M. Aharon, M. Elad, and A. M. Bruckstein, “The {K-SVD}: An Algorithm for Designing of Overcomplete Dictionaries for Sparse Representations,” IEEE Trans. Signal Process., vol. 54, no. 11, pp. 4311–4322, 2006.

(20) Z. Zhang, S. Member, Y. Xu, and S. Member, 07102696, vol. 3. 2015.

(21) T. R. Gillett and A. L. Holven, “Grading of Soft Sugars Photoelectric Reflectance Measurements,” Ind. Eng. Chem., vol. 35, no. 2, pp. 210–214, 1943, doi: 10.1021/ie50398a018.

(22) D. L. Donoho, “For most large underdetermined systems of equations, the minimal 1-norm near-solution approximates the sparsest near-solution,” Commun. Pure Appl. Math., vol. 59, no. 7, pp. 907–934, 2006, doi: 10.1002/cpa.20131.

(23) S. Mika, G. Ratsch, J. Weston, B. Scholkopf, and K. R. Muller, “Fisher discriminant analysis with kernels,” in Neural Networks for Signal Processing - Proceedings of the IEEE Workshop, 1999, pp. 41–48, doi: 10.1109/nnsp.1999.788121.

(24) L. Breiman, “Random forests,” Mach. Learn., vol. 45, no. 1, pp. 5–32, Oct. 2001, doi: 10.1023/A:1010933404324.

How to Cite
Hadra, M., & Abdelrahman, I. (2020). Automatic EEG-based Alertness Classification using Sparse Representation and Dictionary Learning . Journal of Biomedical Engineering and Medical Imaging, 7(5), 19-28.