Abstract
We develop a random forest classifier to automatically classify brain waves into sleep stages by using the publicly available data from PhysioBank. More specifically, we use the EEG signals from a single pair of electrodes (FPz–Cz) recorded from 20 patients and evaluate the impact of data balancing and incorporating signal history on classification results. The accuracy of the model is objectively evaluated using leave-one-out cross-validation. The developed model achieves the mean accuracy of 0.74, with that of the individual sleep stages ranging from 0.65 to 0.91. Next, we leverage this online sleep scoring scheme to introduce dynamic interventions as sleep process evolves over night. We develop a semi-Markov decision process model to determine optimal intervention policies to minimize the gap between the amount of sleep experienced in different stages and predetermined targets and provide computational results.
Similar content being viewed by others
References
Alagoz, O., Maillart, L. M., Schaefer, A. J., & Roberts, M. S. (2004). The optimal timing of living-donor liver transplantation. Management Science, 50(10), 1420–1430.
Ancoli-Israel, S., & Roth, T. (1999). Characteristics of insomnia in the United States: Results of the 1991 National Sleep Foundation Survey. I. Sleep, 22, S347–53.
Ayer, T., Alagoz, O., Stout, N. K., & Burnside, E. S. (2015). Heterogeneity in women’s adherence and its role in optimal breast cancer screening policies. Management Science, 62(5), 1339–1362.
Bajaj, V., & Pachori, R. B. (2013). Automatic classification of sleep stages based on the time-frequency image of EEG signals. Computer Methods and Programs in Biomedicine, 112(3), 320–328.
Başar, E., Başar-Eroglu, C., Karakaş, S., & Schürmann, M. (2001). Gamma, alpha, delta, and theta oscillations govern cognitive processes. International Journal of Psychophysiology, 39(2), 241–248.
Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5–32.
Burrus, C. S., Gopinath, R. A., & Guo, H. (1997). Introduction to wavelets and wavelet transforms: A primer. Upper Saddle River: Prentice-Hall Inc.
Buysse, D. J., Reynolds, C. F, I. I. I., Monk, T. H., Berman, S. R., & Kupfer, D. J. (1989). The pittsburgh sleep quality index: A new instrument for psychiatric practice and research. Psychiatry Research, 28(2), 193–213.
Cherniack, E. P. (2006). The use of alternative medicine for the treatment of insomnia in the elderly. Psychogeriatrics, 6(1), 21–30.
Cho, Y. W., Shin, W. C., Yun, C. H., Hong, S. B., Kim, J., & Earley, C. J. (2009). Epidemiology of insomnia in Korean adults: Prevalence and associated factors. Journal of Clinical Neurology, 5(1), 20–23.
de Gage, S. B., Moride, Y., Ducruet, T., Kurth, T., Verdoux, H., Tournier, M., et al. (2014). Benzodiazepine use and risk of Alzheimer’s disease: Case-control study. BMJ, 349, g5205.
Doroshenkov, L. G., Konyshev, V. A., & Selishchev, S. V. (2007). Classification of human sleep stages based on EEG processing using hidden markov models. Biomedical Engineering, 41(1), 25–28.
Ebrahimi, F., Mikaeili, M., Estrada, E., & Nazeran, H. (2008). Automatic sleep stage classification based on EEG signals by using neural networks and wavelet packet coefficients. In Engineering in medicine and biology society, 2008. EMBS 2008. 30th annual international conference of the IEEE (pp. 1151–1154). IEEE.
Fraiwan, L., Lweesy, K., Khasawneh, N., Wenz, H., & Dickhaus, H. (2012). Automated sleep stage identification system based on time-frequency analysis of a single EEG channel and random forest classifier. Computer Methods and Programs in Biomedicine, 108(1), 10–19.
Friedman, J., Hastie, T., & Tibshirani, R. (2001). The elements of statistical learning (Vol. 1). New York: Springer.
Geisser, S. (1993). Predictive inference (Vol. 55). Boca Raton: CRC Press.
Goldberger, A. L., Amaral, L. A. N., Glass, L., Hausdorff, J. M., Ivanov, P. C., Mark, R. G., et al. (2000). Physiobank, physiotoolkit, and physionet components of a new research resource for complex physiologic signals. Circulation, 101(23), e215–e220.
Güneş, S., Polat, K., & Yosunkaya, Ş. (2010). Efficient sleep stage recognition system based on EEG signal using k-means clustering based feature weighting. Expert Systems with Applications, 37(12), 7922–7928.
Hachinski, V., Iadecola, C., Petersen, R. C., Breteler, M. M., Nyenhuis, D. L., Black, S. E., et al. (2006). National institute of neurological disorders and stroke–canadian stroke network vascular cognitive impairment harmonization standards. Stroke, 37(9), 2220–2241.
Harmat, L., Takács, J., & Bodizs, R. (2008). Music improves sleep quality in students. Journal of Advanced Nursing, 62(3), 327–335.
Hobson, J. A. (2005). Sleep is of the brain, by the brain and for the brain. Nature, 437(7063), 1254–1256.
Hoddes, E., Zarcone, V., Smythe, H., Phillips, R., & Dement, W. C. (1973). Quantification of sleepiness: A new approach. Psychophysiology, 10(4), 431–436.
Hsu, Y.-L., Yang, Y.-T., Wang, J.-S., & Hsu, C.-Y. (2013). Automatic sleep stage recurrent neural classifier using energy features of EEG signals. Neurocomputing, 104, 105–114.
Iber, C., Ancoli-Israel, S., Chesson, A., & Quan, S. F. (2007). Authors; for the American Academy of Sleep Medicine. In The AASM manual for the scoring of sleep and associated events: Rules, terminology and technical specifications. American Academy of Sleep Medicine.
Jo, H. G., Park, J. Y., Lee, C. K., An, S. K., & Yoo, S. K. (2010). Genetic fuzzy classifier for sleep stage identification. Computers in Biology and Medicine, 40(7), 629–634.
Johns, M. W. (1991). A new method for measuring daytime sleepiness: The Epworth sleepiness scale. Sleep, 14(6), 540–545.
Johnson, J. E. (2003). The use of music to promote sleep in older women. Journal of Community Health Nursing, 20(1), 27–35.
Khojandi, A., Maillart, L. M., Prokopyev, O. A., Roberts, M. S., & Saba, S. F. (2018). Dynamic abandon/extract decisions for failed cardiac leads. Management Science, 64(2), 633–651. https://doi.org/10.1287/mnsc.2016.2621.
Koley, B., & Dey, D. (2012). An ensemble system for automatic sleep stage classification using single channel EEG signal. Computers in Biology and Medicine, 42(12), 1186–1195.
Kurt, M., Denton, B. T., Schaefer, A. J., Shah, N. D., & Smith, S. A. (2011). The structure of optimal statin initiation policies for patients with type 2 diabetes. IIE Transactions on Healthcare Systems Engineering, 1(1), 49–65.
Lai, H.-L., & Good, M. (2005). Music improves sleep quality in older adults. Journal of Advanced Nursing, 49(3), 234–244.
Lavieri, M. S., Puterman, M. L., Tyldesley, S., & Morris, W. J. (2012). When to treat prostate cancer patients based on their PSA dynamics. IIE Transactions on Healthcare Systems Engineering, 2(1), 62–77.
Lee-Chiong, T. (2008). Sleep medicine: Essentials and review. Oxford: Oxford University Press.
Levin, Y. I. (1998). “Brain music” in the treatment of patients with insomnia. Neuroscience and Behavioral Physiology, 28(3), 330–335.
Li, R. H. Y., Wing, Y. K., Ho, S. C., & Fong, S. Y. Y. (2002). Gender differences in insomniaa study in the Hong Kong Chinese population. Journal of Psychosomatic Research, 53(1), 601–609.
Liang, S.-F., Kuo, C.-E., Hu, Y.-H., Pan, Y.-H., & Wang, Y.-H. (2012). Automatic stage scoring of single-channel sleep EEG by using multiscale entropy and autoregressive models. IEEE Transactions on Instrumentation and Measurement, 61(6), 1649–1657.
Lopez, H. H., Bracha, A. S., & Bracha, S. (2002). Evidence based complementary intervention for insomnia. Hawaii Medical Journal, 61, 162–163.
Mai, E., & Buysse, D. J. (2008). Insomnia: Prevalence, impact, pathogenesis, differential diagnosis, and evaluation. Sleep Medicine Clinics, 3(2), 167–174.
Morphy, H., Dunn, K. M., Lewis, M., Boardman, H. F., & Croft, P. R. (2007). Epidemiology of insomnia: A longitudinal study in a UK population. Sleep, 30(3), 274.
Ogata, S. (1995). Human EEG responses to classical music and simulated white noise: Effects of a musical loudness component on consciousness. Perceptual and Motor Skills, 80(3), 779–790.
Ohayon, M. M. (2002). Epidemiology of insomnia: What we know and what we still need to learn. Sleep Medicine Reviews, 6(2), 97–111.
Oropesa, E., Cycon, H. L., & Jobert, M. (1999). Sleep stage classification using wavelet transform and neural network. International Computer Science Institute. https://urldefense.proofpoint.com/v2/url?u=https-3A__www.icsi.berkeley.edu_icsi_node_2897&d=DwIFaQ&c=vh6FgFnduejNhPPD0fl_yRaSfZy8CWbWnIf4XJhSqx8&r=r2aSgYn6PHMQXXmeBiKsnvfFG9T9U5fmdQ67xEVmgo0&m=4Ofo-8UmK6ltyjCByQN45BoxJ_bz4Rqnhlre5mwb8AU&s=f62ct-Q9qpvc8l45Sowcr6z8qN0G7J9US5Lg6QZQg24&e=.
Özşen, S. (2013). Classification of sleep stages using class-dependent sequential feature selection and artificial neural network. Neural Computing and Applications, 23(5), 1239–1250.
Pagel, J. F., & Parnes, B. L. (2001). Medications for the treatment of sleep disorders: An overview. Primary Care Companion to the Journal of Clinical Psychiatry, 3(3), 118.
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., et al. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825–2830.
Pinna, G. D., Robbi, E., La Rovere, M. T., & Maestri, R. (2012). A hybrid approach for continuous detection of sleep-wakefulness fluctuations: Validation in patients with Cheyne–Stokes respiration. Journal of Sleep Research, 21(3), 342–351.
Puterman, M. L. (1994). Markov decision processes. New York: Wiley.
Rechtschaffen, A., & Kales, A. (1968). A manual of standardized terminology, techniques and scoring system for sleep stages of human subjects. Washington: US Government Printing Office, US Public Health Service.
Rosanova, M., Casali, A., Bellina, V., Resta, F., Mariotti, M., & Massimini, M. (2009). Natural frequencies of human corticothalamic circuits. The Journal of Neuroscience, 29(24), 7679–7685.
Rosenberg, R. S., & Van Hout, S. (2013). The American Academy of Sleep Medicine inter-scorer reliability program: Sleep stage scoring. Journal of Clinical Sleep Medicine, 9(1), 81–87.
Roth, T., & Ancoli-Israel, S. (1999). Daytime consequences and correlates of insomnia in the United States: Results of the 1991 National Sleep Foundation Survey II. Sleep, 22(Suppl. 2), S354–S358.
Sanei, S., & Chambers, J. A. (2013). EEG signal processing. Hoboken: Wiley.
Saper, C. B., Fuller, P. M., Pedersen, N. P., Lu, J., & Scammell, T. E. (2010). Sleep state switching. Neuron, 68(6), 1023–1042.
Shechter, S. M., Bailey, M. D., Schaefer, A. J., & Roberts, M. S. (2008). The optimal time to initiate HIV therapy under ordered health states. Operations Research, 56, 20–33.
Silber, Michael H., Ancoli-Israel, Sonia, Bonnet, Michael H., Chokroverty, Sudhansu, Grigg-Damberger, Madeleine M., Hirshkowitz, Max, et al. (2007). The visual scoring of sleep in adults. Journal of Clinical Sleep Medicine, 3(2), 121–131.
Sinha, R. K. (2008). Artificial neural network and wavelet based automated detection of sleep spindles, REM sleep and wake states. Journal of Medical Systems, 32(4), 291–299.
Stickgold, R., Whidbee, D., Schirmer, B., Patel, V., & Hobson, J. A. (2000). Visual discrimination task improvement: A multi-step process occurring during sleep. Journal of Cognitive Neuroscience, 12(2), 246–254.
Tagluk, M. E., Sezgin, N., & Akin, M. (2010). Estimation of sleep stages by an artificial neural network employing EEG, EMG and EOG. Journal of Medical Systems, 34(4), 717–725.
Tamminen, J., Payne, J. D., Stickgold, R., Wamsley, E. J., & Gaskell, M. G. (2010). Sleep spindle activity is associated with the integration of new memories and existing knowledge. The Journal of Neuroscience, 30(43), 14356–14360.
Taylor, D. J., Lichstein, K. L., Durrence, H. H., Reidel, B. W., & Bush, A. J. (2005). Epidemiology of insomnia, depression, and anxiety. Sleep, 28(11), 1457.
Walker, M. P., Brakefield, T., Morgan, A., Hobson, J. A., & Stickgold, R. (2002). Practice with sleep makes perfect: Sleep-dependent motor skill learning. Neuron, 35(1), 205–211.
Xie, L., Kang, H., Xu, Q., Chen, M. J., Liao, Y., Thiyagarajan, M., et al. (2013). Sleep drives metabolite clearance from the adult brain. Science, 342(6156), 373–377.
Yang, G., Lai, C. S. W., Cichon, J., Ma, L., Li, W., & Gan, W. (2014). Sleep promotes branch-specific formation of dendritic spines after learning. Science, 344(6188), 1173–1178.
Yang, M. C. K., & Hursch, C. J. (1973). The use of a semi-markov model for describing sleep patterns. Biometrics, 29(4), 667–676.
Zhao, L. (2009). Multi-state processes with duration-dependent transition intensities: Statistical methods and applications. Ph.D. Thesis, Department of Statistics and Actuarial Science-Simon Fraser University.
Zhu, G., Li, Y., & Wen, P. P. (2014). Analysis and classification of sleep stages based on difference visibility graphs from a single-channel EEG signal. IEEE Journal of Biomedical and Health Informatics, 18(6), 1813–1821.
Ziv, N., Rotem, T., Arnon, Z., & Haimov, I. (2008). The effect of music relaxation versus progressive muscular relaxation on insomnia in older people and their relationship to personality traits. Journal of Music Therapy, 45(3), 360–380.
Zoubek, L., Charbonnier, S., Lesecq, S., Buguet, A., & Chapotot, F. (2007). Feature selection for sleep/wake stages classification using data driven methods. Biomedical Signal Processing and Control, 2(3), 171–179.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Khojandi, A., Shylo, O. & Zokaeinikoo, M. Automatic EEG classification: a path to smart and connected sleep interventions. Ann Oper Res 276, 169–190 (2019). https://doi.org/10.1007/s10479-018-2823-1
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10479-018-2823-1