• No results found

How Much Sleep Do You Need?

In document Deep Learning Made Easy With R (Page 165-169)

How much sleep do you enjoy each night? How much would you like? Are you getting the recommended amount?

Sleep scholars Webb and Agnew suggest 9 to 10 hours per night for optimal benefit104. Are you getting that much?

Don’t worry if you are not consistently hitting 10 hours. You see, sleep researcher Jim Horne105, in his comprehensive trea- tise, argues between 4.5 to 6 hours per night maximum. Appar- ently, according to Jim, you can easily adapt to a 5 or 6 hour sleep schedule; anything more than this is “optional”, mere

restful “gravy”, unnecessary to fulfill your physical need for sleep or prevent the accumulation of that hazy feeling which is the result of sleep deficit. It seems experts in the field, who have studied the phenomenon for years have wildly different suggestions.

The lack of a clear scientific answer has not stopped the pop- ular media from joining the sleep bandwagon. In typical media hype, the issue is no longer about feeling a little tired (or not) when stumbling out of bed in the morning, afternoon or evening (depending on your lifestyle); instead is has somehow mutated into a desperate battle between life and death. The heavy- weight Time Magazine reported106 “Studies show that people who sleep between 6.5 hr. and 7.5 hr. a night...live the longest. And people who sleep 8 hr. or more, or less than 6.5 hr., they don’t live quite as long.” Shawn Youngstedt, a professor in

the College of Nursing and Health Innovation at Arizona State University Phoenix is reported in the Wall Street Journal107

as noting “The lowest mortality and morbidity is with seven

hours.” In the same article Dr. Youngstedt, a scholar in the

effects of oversleeping, warns “Eight hours or more has consis-

tently been shown to be hazardous.” All this adds new meaning

to the phrase “Snooze you lose”. It seems that extra lie in on Sunday mornings might be killing you.

Not to worry, another, perhaps more sober headed, panel of respected sleep scholars has suggested108 “7 to 9 hours for young adults and adults, and 7 to 8 hours of sleep for older adults.” Whatever is the precise number of hours you get each

night or actually need, I think we can all agree that a restful night of calm relaxing sleep can work wonders after a hectic, jam packed day.

According to the American Academy of Sleep Medicine109

restful sleep is a process which passes through five primary stages. These are rapid eye movement, stages N1, N2, slow wave sleep (N3) and waking up (W). Each specific stage can be scientifically measured by electrical brain activity recorded us- ing a polysomnogram with accompanying hypnograms (expert

annotations of sleep stages) used to identify the sleep stage. This process, as you might expect is manually intensive and subject to human error.

Imperial College, London scholars Orestis Tsinalis, Paul Matthews and Yike Guo develop a SA to automatically score which stage of sleep an individual is in110. The present ap- proach to scoring sleep phases is inefficient and prone to error. As Tsinalis, Matthews and Guo explain “...one or more experts

classify each epoch into one of the five stages (N1, N2, N3, R or W) by quantitatively and qualitatively examining the signals of the PSG [polysomnogram] in the time and frequency domains.”

The researchers use an open sleep dataset111. The sleep stages were scored by individual experts for 20 healthy sub- jects, 10 male and 10 female, aged 25–34 years. With a total of around 20 hours of recordings per subject. Because of an imbalance between the response classes (sleep stages) the re- searchers use a class-balanced random sampling scheme with an ensemble of autoencoder classifiers, each one being trained on a different sample of the data.

The final model consisted of an ensemble of 20 independent SA all with the same hyperparameters. A type of majority voting was used to determine the classification of epochs; the researchers took the mean of the class probabilities from the individual SA’s outputs, selecting the class with the highest probability.

The confusion matrix is shown in Figure 6.2. For all sleep stages the classification was correct at least 60% of the time. The most accurate classification of sleep stage occurred for N3 (89%), followed by W (81%). Notice the upper and lower tri- angle of the confusion matrix are similar to what you might observe in a correlation matrix being almost mirror images of each other. This is an indication that the misclassification er- rors due to class imbalances have been successfully mitigated.

The researchers also compare their approach to other meth- ods developed in the literature. On every performance metric considered their approach outperforms by a wide margin.

The clear superiority of their results encourages Tsinalis, Matthews and Guo to confidently proclaim “To the best of our

knowledge our method has the best performance in the literature when classification is done across all five sleep stages simulta- neously using a single channel of EEG [Electroencephalogra-

phy].”

Figure 6.2: Confusion matrix of Tsinalis, Matthews and Guo.

The numbers in bold are numbers of epochs. The numbers in parentheses are the percentage of epochs that belong to the class classified by the expert (rows) that were classified by their algo- rithm as belonging to the class indicated by the columns. Source of table: Tsinalis, Matthews and Guo cited in endnote number

sec. 110.

Tsinalis, Matthews and Guo have unleashed the power of SA to make major improvements in their field of interest. Who would disagree with the development of automatic classifica- tion machines for sleep stage? The deployment and widespread adoption of such machines could be an important step forward for researchers in the entire field of sleep studies. Who knows, maybe it will help to settle the question of “How much sleep

Build a Stacked Autoencoder in Less

In document Deep Learning Made Easy With R (Page 165-169)