Computational Sleep Behavior Analysis: A Survey

Sleep is a key marker of health, as it can either be a cause or a consequence. It is traditionally studied in clinical environments using dedicated medical devices. Recent technological developments, e.g., in sensing and data analysis, have led to new approaches for sleep monitoring and assessment, which are attracting increasing attention in the emerging domain of personalized smart healthcare. Nevertheless, a high-level overview of technology-enabled research on sleep that can inform related communities of the latest developments is lacking. In this paper, we present a comprehensive review to examine the current status of various aspects of technology-based sleep research. We first characterize sleep behavior and key areas of sleep assessment, and we introduce a general review of the methodologies used in this domain. We review the major technological methods and trends associated with sleep monitoring, data collection and sleep behavior analysis, from which strengths and weaknesses are highlighted. Finally, we also discuss challenges and promising directions for future research.


I. INTRODUCTION
Sleep influences people's lives but still remains mysterious in many ways.It is a recovery mechanism in which heart rate and breathing are slowed, approaching a state of paralysis of the body, while the brain processes experiences from the day and relaxes.Sleep is necessary for life, although the evolutionary reasons for this process have not yet been fully explored.Sleep status can be assessed using physical or physiological parameters, such as respiration rate, heart rate, temperature and body movement [1].Based on the features extracted from these parameters, sleep behavior can be determined in terms of sleep time, duration, latency, arousal, wake after sleep onset (WASO) and sleep efficiency (SE) [2].
Sleep behavior is traditionally studied in clinical environments and is still the commonly accepted method for sleep assessments.Polysomnography (PSG) is the main medical gold standard used for sleep disorder classification, such as sleep-related breathing disorders [2].This system calculates SE, sleep latency, arousal index, sleep stages and other sleep-disorder-related factors from the measurement data.In addition to PSG, another important tool is the noninvasive actigraphy, which measures acceleration to extract information from movement-related changes [1].These technologies are mainly used by clinicians and have certain restrictions.The restrictions for PSG include short-term sleep monitoring and expensive equipment.Furthermore, it is well known that a first-night effect is present during laboratory recordings, and at least two consecutive nights of data collection are necessary, especially for patients with insomnia [3].For actigraphy, the available sleep information is restricted based on the collected movement data.Medical research is interested in automating processes to provide faster and earlier diagnoses of sleep disorders and exploring night behavior.
Computational methods are trending and able to address more complex problems.These include the diagnosis of sleep disorders, investigation of the areas that are influenced by sleep and recurrent sleep patterns.Moreover, IoT devices are advancing, creating new opportunities and attracting increasing attention in home-based sleep assessments.Home-based monitoring allows self-assessment and self-management of sleep status on a day-to-day basis within a person's natural home environment.The devices used in this field vary, e.g., smartwatches, radio signals or Doppler radar devices.The collected data are analyzed and assessed by applying data mining and machine learning techniques to extract key sleep parameters and indicators.Home-based sleep assessments with sensor technology can not only help individuals assess and manage their sleep but also help researchers find connections and correlations between, e.g., day and night behaviors [4].
Many studies have investigated the use of various technologies for sleep monitoring and assessment, as well as the influence factors of sleep.Although substantial progress has been achieved, challenges and gaps remain in terms of (1) the accuracy and validity of the proposed methods towards gold standards and (2) correlations between sleep and daily behavior.Review papers regarding sleep mainly concentrate on the medical viewpoint using medical devices [2], [5], [6], excluding the interesting computational component, especially in home applications.The signals used in sleep analysis are discussed in [1], but over the past years, technologies have advanced, and new devices and areas have been developed.This includes automatic sleep disorder detection and new developments in techniques such as deep learning.Nevertheless, a comprehensive literature review that can inform researchers and practitioners of the state-of-the-art in this emerging research field and highlight research opportunities and directions is lacking.
This paper is structured as follows: Section II characterizes common sleep behavior considering movement, stable states, abnormal behavior, and how they relate to sleep disorders.In section III, sleep monitoring and data collection are discussed, introducing important sleep parameters and devices from medical and research perspectives.The focus is on section IV, which reviews computational methods for sleep behavior analysis in the fields of sleep stage classification, sleep position recognition, and disease investigation.

II. SLEEP BEHAVIOR CHARACTERIZATION
Sleep behavior can basically be divided into movement and stable states.Movement contains information about sleep and wake episodes from which sleep stages can be extracted.Conversely, stable states mainly describe sleep positions during periods without movement.Accordingly, normal and abnormal behaviors can be characterized, possibly leading to the diagnosis of sleep disorders and chronic diseases.

A. MOVEMENT BEHAVIOR
Sleep is a relaxed state that still contains self-induced movements, mainly to prevent pressure ulcers [7].These self-induced movements are defined as movement states that create behavior over time.Movement is the main information source for most sensors.An exception is PSG, which is based on a combination of motion and non-motion information.
Movement behavior can be used to distinguish sleep from wake episodes [8]- [11].Based on this information, objective sleep features can be extracted, e.g., sleep continuity [12], efficiency [11], and time [13].Combinations of motion and non-motion information lead to sleep motion behavior, which can be further correlated to sleep stages.Sleep stages describe different levels of sleep, provide hints about patient health and are one of the major aspects considered during a PSG visit.
Many disorders exhibit correlations with specific anomalies in sleep cycles or amount of time in specific sleep stages.Normally, sleep stages are measured and defined over brain-wave data but are considered difficult to classify and therefore need trained technicians to be distinguished [1].Abnormal movement during sleep helps to diagnose certain diseases.This includes movement from the eyes, chin, limbs, chest wall, and upper abdomen [5].Based on irregular movements, sleep-related movement disorders can be diagnosed, such as periodic limb movement disorder, restless legs syndrome, and sleep-related bruxism [5].Furthermore, irregular movements can help to diagnose disorders, such as rapid eye movement (REM) disorders or sleep apnea.Sleep apnea can be measured by respiration effort over abnormal abdomen movement during apneas [5].Abnormal wake-sleep behavior during the day is used to diagnose circadian rhythm sleep-wake disorders [5].This knowledge can potentially help investigate the severeness of insomnia based on the wake and sleep periods during the night.From movement behavior, various information can be obtained, but it can still be extended by investigating the periods with no motion.

B. STABLE STATE BEHAVIOR
Stable states investigate the periods in rest with no movement.These stable states are mainly related to sleep positions.Sleep postures are independent from sleep stages [14]; therefore, they provide additional insights into sleep behavior [15].
During periods without movement, four basic sleep postures can be distinguished, i.e., supine, prone, right, and left lateral.Sleep position tracking is predominately motivated by the prevention of pressure ulcers [15]- [17] or based on the influence on sleep apnea [18] [15].For sleep apnea, sleeping on the back, i.e., supine position, relates to a higher apnea/hypoapnea index (AHI) compared to laying on the side [18].Moreover, sleep parameters such as sleep quality are influenced by different sleep positions [19].

C. SLEEP BEHAVIOR REGARDING DISORDERS AND CHRONIC DISEASES
Sleep behavior is manifested in established sleep parameters.These parameters have proven useful in investigating abnormal sleep behavior.Consequently, abnormal behavior can classify sleep disorders and is related to certain chronic diseases [25].
Certain sleep patterns are used to define sleep disorders and have already been investigated for sleep apnea [26] and insomnia [27].The diagnosis of sleep apnea relies on sensors in a sleep clinic, whereas the diagnosis of insomnia is often based on subjective sleep questionnaires [2].Sleep apnea is diagnosed using AHI, which represents the apnea and hypopnea events per hour [28]; see table 3.An AHI of less than 5 is interpreted as healthy, whereas an AHI between 5 and 15 is classified as mild obstructive sleep apnea, an AHI between 15 to 30 is classified as moderate sleep apnea, and an AHI higher than 30 is classified as severe sleep apnea [25].For insomnia, the Insomnia Severity Index and Bergen Insomnia Scale can be used for the assessment [2].Medical history and physical exams can be used in combination to quickly and accurately make diagnoses, such as explored for sleep apnea diagnosis in [25].Sleep disorders are generally related to poor sleep quality.They are common in the population and add costs to health care and the economic system [1].A chronic lack of sleep can lead to impulsive behavior, depression, and chronic illnesses.However, when people rest well, their well-being benefits, and they can better handle pressure and stress [29].Additionally, sleep quality has a high impact on physical and mental well-being [30].Therefore, monitoring social and sleep behaviors can help the early diagnosis of, e.g., major depressive disorder [31].

III. SLEEP MONITORING AND DATA COLLECTION
In this section, home-based technologies, medical devices for sleep assessment, and sleep parameters are discussed.

A. SLEEP MONITORING IN THE MEDICAL DOMAIN
The gold standards for assessing sleep disorders and issues from a medical expert's perspective are PSG and actigraphy.

1) Polysomnography
PSG is a method that collects sensory data from devices applied to the human body and within the environment.
The wearable devices that can be used in a PSG setting are electroencephalogram (EEG), electrooculogram (EOG), electromyogram (EMG), electrocardiogram (ECG), pulse oximetry, respiratory monitors, capnography, transcutaneous monitors, thermometers, esophageal tests, nasal and oral airflow sensors, gastroesophageal monitors, and blood pressure monitors [2], [34].The application area of these specific sensors is shown in fig.1a.The nonwearable sensors that are applied in the environment are microphones, video cameras, and light intensity sensors [2].
PSG monitors brain and heart signals and movement.This method is predominately used for assessing sleep disorders such as sleep apnea and restless legs syndrome.Factors such as sleep stages, SE, sleep latency, and arousal index can be extracted from the data [35].To extract knowledge from the data, scoring methods are applied.The clinical gold standards for sleep scoring with PSG are the Rechtschaffen and Kales (R&K) method [4], [36] and an alternative method presented by the American Academy of Sleep Medicine (AASM) [37].The scoring is generally based on 30-second epochs [35].Originally, six sleep stages [36] were assessed, wake, REM, S1, S2, S3, and S4, whereas AASM [37] provides five stages: wake, REM, N1, N2, and N3.In general, R&K stages can be interpreted as AASM stages by combining S3 and S4 as N3.In table 1, a description of the sleep stages and difference between the guidelines are presented.Large Amount Rebuilds and Repairs [38], [39] The higher number of body-attached sensors has the drawback of falsified sleep behavior, which does not represent the natural habit.This leads to the advice that at least two consecutive nights of data collection should be performed [3].Another issue is that the method is expensive due to the laboratory setting and the fact that an observer is needed to check the functioning of the applied devices during the night [7].Research on PSG is currently focusing on how to reduce the number of sensors while automatically recognizing the main sleep behavior measurements.This leads to studies with single-channel EEG in sleep stage classification [40]- [42], which can more easily be applied at home.

2) Actigraph Unit
Actigraph devices are able to measure activities during a 24-hour time period and are therefore also used in sleep assessments.The device is widely accepted for objective sleep quality measurements.An actigraph is a wearable device attached to the nondominant wrist, providing information about sleep-wake patterns during the night [7].The device can be used at home, which has the advantage of interfering less with natural sleeping behavior.
Actigraph monitors are mainly based on accelerometer data but can also include gyroscopes and magnetometers.Ambient light is generally collected to help in wake-sleep recognition.Furthermore, personal inputs can be given that tell the device when the sleeping period starts.The usual assessment consists of seven consecutive days to obtain a representative picture of the patient's sleep.This can also be considered the recommended amount of days [43].This method is an unsupervised wearable approach for sleep analysis.The application area of the sensor is shown in fig.1b.Current research is concentrating on extracting knowledge from the already processed data coming from medically approved devices such as ActiGraph or Actiwatch.These systems provide activity levels with wake and sleep labels.Activity levels provide the intensity of movement within a usual 30-second interval.

B. HOME-BASED SLEEP MONITORING
Sleep monitoring at home is generally accomplished through wearable or nonwearable devices.

1) Wearables
Wearable devices are attached to the human body.Small sensors are typically attached to one of the following areas: wrist, chest, ankles or hip.The advantage of these sensors is their low cost and easy application at home.Data are gathered from sensors such as 3-axis accelerometers, thermostats or photoplethysmography (PPG).Knowledge is generally obtained by applying data mining techniques for sleep position detection [15], [23], [46], sleep stage classification [4], [9], [11], [47], heart rate [29] and respiration rate [46] analysis, and body temperature monitoring [29], [48].
Sleep position detection is usually investigated using either accelerometers [15], [46] or wearable wireless devices [23] on the chest or ankles.In general, sleep stage classification uses either only 3-axis accelerometers [9], [11], [47] or in combination with, e.g., chest strap on wrist and ankle [4]; alternatively, such classification can use PPG [8], [49].Other sensors include thermometers that measure body temperature to extract sleep and wakefulness [48].Research also applies commercial wearables that are available on the market, typically smartwatches, e.g., for sleep behavior analysis, determining that automated selfmanagement tools reduce burdens and increase efficiency [50].Various devices are available and have already been analyzed in terms of performance and accuracy [13], [35], [51]- [55] and user perception [35], [56].The devices con-sidered in the performance investigations are Actiwatch, ActiGraph GT3X+, FitBit Flex/One, FitBit Charge 2, FitBit Alta HR, Misfit Shine, Basis Health Tracker, Withings Pulse O2, GENEactiv, Jawbone Up3 [13], [35], [51], [55]- [60], ResMed S+ [54], EarlySense [53], Smart Eye Masks [61] and Microsoft Band I [34].A summary of the Bland-Altmann mean difference and error percentage is shown in table 2, excluding values that are not significant (α = 0.05).The output shows that most of the sleep devices overestimate the total sleep time (TST), where Actigraph GT3X+ (4 min) provided the most relevant output compared to the Zmachine [13] and FitBit Charge 2 (-9 min) compared to PSG [55] considering healthy participants.For SE measurements, Actiwatch (4.8%) performed with the best accuracy [60] for healthy individuals, and FitBit Alta HR (2%) performed the best for individuals with specific diseases.FitBit Charge 2 (24.5 min) represents WASO most accurate [59] for healthy individuals, whereas Actiwatch (-21.6 min) [60] is the most accurate for participants with medical conditions.FitBit Charge 2 (4 min) can represent sleep onset latency the best [55] for healthy individuals, whereas FitBit Flex (2.4 min) [60] does so for individuals with medical conditions.The differences between these investigations are also dependent on the participants included, which means that for healthy individuals and those with medical conditions, agreement changes [62].For Misfit Shine and Basis, light and deep sleep can be distinguished, and a comparison reveals that Basis performs more accurately than Misfit Shine [52].Additionally, accelerometer data extraction is over-and underestimating certain sleep parameters compared to PSG [12].Ravichandran et al. [35] reviewed different sleep-sensing devices and their performance in relation to the opinions of experts and end users.They investigated Misfit Shine, Jawbone UP3, FitBit One, and FitBit HR.Overall, experts are concerned that sleep quality information is inaccurately transported to end users.Design recommendations based on the level of automation, understandable visualization, and emotional influence factors were investigated in [56] considering Polar Loop, Jawbone Up3, Misfit Shine, and FitBit Flex.

2) Nonwearables
Nonwearable devices are not attached to the human body and therefore are the least interfering sleep assessment method, not disturbing the person's regular sleeping habits.In general, techniques are based on either single devices, e.g., Kinect sensors, or multiple devices, e.g., integrated in smart beds.Movement investigations use data collected from sleep trackers.There are already applications on the market for sleep self-management with smart devices, providing insights into users' sleep.
Nonwearable sensors are widely applied, such as load cells, force sensors, air cushions, pressure pads, water-filled vinyl tubes [7], smartphones [31], [63], Shimmer sensors [10], Doppler radar signals [64], [65] also with sound signals [65], [66], pressure sensors [16], [17], [17], [20]-   [22], [67], and radio signals [68].Air cushions under the bed collect data such as respiration rate, heart rate, and body movement to estimate sleep stages.Equally, a waterfilled tube under a pillow can be used to record these three features.Additionally, pressure pads can be used to evaluate the heart and breathing rates and even snoring, body movements, and sleep apnea events [7].However, load cells are employed to detect movement and sleep-wake patterns and estimate deep sleep stages.Pressure sensors integrated in mats, beds or bedsheets typically report good performance in detecting body locations and positions in the bed [15]- [17], [17], [20]- [22], [67], and even sleep stages can be extracted [23].However, imaging devices are also used to detect sleep postures, such as Kinect sensors [24] and depth cameras [30], [69].In sleep-wake and sleep stage recognition, Shimmer sensors on the bed [10], Doppler radar [64], and sound signals [65], [66] were investigated.Sleep trackers that are applied within the environment include smartphones, smart mats or whole beds.Smartphone applications are the most easily accessible for users and therefore an inexpensive method for sleep tracking.Smartphones monitor behavior during sleep, including noise, audio, ambient light, and movement [63], where less mobility and phone usage relate to better sleep [31].A large number of applications attempt to provide insights into daily sleep cycles, SE, and duration [70], [71].Additionally, some applications provide the opportunity to self-report moods and daily habits [70].
Smart mats are a good source of information, are easily applicable, and provide higher accuracy.There are various devices on the market that use smart mat technology to collect movement, heart rate, and respiration rate [7].Different sensors can be integrated into smart beds, such as force, piezoelectric, and pressure sensors [7].Others also combine this technology with environmental sensors [7].Based on these data, specific sleep-related information, e.g., bed exits, and sleep statistics, such as sleep quality and movement [7], can be provided to the users, which is useful in, e.g., pain management and fall prevention [7].The locations of nonwearable devices inside a sleeping environment are depicted in fig.1c.

C. DISCUSSION AND SUGGESTIONS ON SLEEP MONITORING
There are advantages and disadvantages for all sensors that must be carefully considered based on the area of exploration.
Actigraph units and PSG are used for different areas of investigation.PSG provides the highest accuracy but is expensive, can only be performed in a supervised laboratory setting, and interrupts the person's sleep.PSG requires two days of data collection and applies more than three sensors.
In comparison, home-based actigraphy needs at least 7 days of collection and only one sensor, resulting in low costs, not intervening with the natural sleeping habit, and providing intermediate accuracy.Nonwearable devices applied in the environment at home are the least interfering method but have less accurate outcomes, e.g., for smartphones [72], and are often immobile compared to wearables.
Although imaging can generate good position recognition outcomes, it leads to privacy concerns and cannot accurately recognize movements through blankets [15], [24].In sleep position recognition, nonwearable devices generally cannot distinguish supine and prone positions.In contrast, a wearable approach provides a mobile solution with limited privacy issues and is able to distinguish between multiple people in one bed.However, it still relies on body-worn sensors, which can create discomfort [15].Sleep stage recognition depends on more advanced technology measuring EEG data.Currently, research is advancing wearable technologies such as actigraphy to be easier to apply at home.Details can be found in IV.Self-management becomes much more accessible for users at home.Thus, current research suggests different devices depending on the sleep factors of interest; for details, refer to table 2. The easiest devices to start with are smartwatches, as they have a reasonable accuracy compared to smartphone applications and are more accessible than smart beds.Although numerous ready-to-use applications are available with different collection processes and outputs, open issues such as accuracy and validity remain.When choosing the ideal wearable device for investigation, it is suggested to consider the target group, as this can influence the accuracy of wearable devices [62].Another usual generalization problem comes with validating small datasets, which does not allow overall conclusions such as in [31].

D. MEASURED SLEEP PARAMETERS
The main features describing sleep are respiration rate, heart rate, temperature, body movement [1] and brain waves [2].Considering various hypotheses, different features are important and are weighted more strongly than others.Depending on the aim, objective or subjective measurements are explored, which present different insights into the sleep of individuals; for details, refer to table 3.

1) Objective Sleep Measurements
Objective sleep parameters are concluded from sensor data.These parameters include sleep stages, disturbances, sleep regularity, SE, duration, latency, arousals, spindles, and many more.For example, sleep stages are investigated by heart or respiration rate using the knowledge of existing relations between them [73], whereas skin temperature can be used for estimating disturbances [48].Sleep continuity is based on the percentage of TST in each sleep stage, SE, and the arousal index [12].Sleep quality, regularity, sleepiness level, and chronotype are considered new insight indicators investigated with wearable devices compared to traditional parameters, such as time falling asleep, number of awakes, and sleep duration [74].Explicitly, sleep regularity measures the affinity between sleeping periods from consecutive days [74], [75].

2) Subjective Sleep Measurements
Subjective sleep parameters are typically assessed by sleep questionnaires that extract information from users by asking questions to assess sleep issues [2].These sleep parameters include, e.g., nightmares, bedtime, and rise time; see table 3 for details [74].The extracted factors can be assessed with different techniques, such as the SATED assessment [35], Consensus Sleep Diary, Pittsburgh sleep quality index, Mini Sleep Questionnaire, Epworth Sleepiness Scale, Insomnia Severity Test, and Sleep Disorders Questionnaire [5].We refer to the work of Ibáñez et al. [5] for a thorough review of subjective methods.

3) Discussion on Sleep Parameters
Objective methods monitor and measure individuals' sleep behavior in a specific setting, e.g., PSG in a hospital.In comparison, subjective sleep analysis has the advantage that experts are not necessary and are not location dependent, but the disadvantage of inaccuracy remains [74].These methods are occasionally difficult to compare, as definitions are not consistent in objective and subjective feature calculations.In table 3, features and their formulas are presented.Some of the formulas are for PSG and can be translated to actigraphy; others are developed specifically for actigraph data.

IV. COMPUTATIONAL ANALYSIS METHODS
The main methods for sleep behavior analysis are data mining techniques, such as artificial intelligence, and statistical analysis.Statistical analysis is a well-developed method, whereas artificial intelligence has recently become more popular in the fields of health and medicine.It has proven to be a good performing method for analyzing more difficult scientific problems, such as sleep behavior and disease detection.Various techniques are available and perform best for specific sleep problems.Prominent methods are random forests (RFs), decision trees (DTs), support vector machines (SVMs), k-nearest neighbors (kNNs), hidden Markov models (HMMs), Bayesian classifiers (BCs), neural networks (NNs), and deep learning methods.Specifically, deep learning can be described as an NN with more than three layers.Methods such as recurrent NN (RNN), e.g., long short-term memory network (LSTM) and convolutional NN (CNN), are adapted in sleep research.
We will discuss computational sleep behavior analysis with a focus on machine learning approaches for the main problems, such as sleep stage, sleep position, and sleep disorder investigations.

A. VALIDATION OF SLEEP ANALYSIS METHODS
Most technologies and approaches, such as home-based sensors and single-channel EEG, are tested against the gold standard PSG.Researchers should be aware that the interscorer agreement of human-scored parameters does not have a perfect agreement but rather 82.6% [81].This can result in a bias towards a rater's style if only one person scores sleep data.It also means that discussions need to take this into account.Seldom, data from actigraph units are used for validation [10].The most often applied performance measures in computer science are accuracy, recall (=sensitivity), specificity, precision, and Cohen's kappa.These measures are also used for validation purposes in sleep behavior analysis.Occasionally, the receiver operating characteristic (ROC) curve, area under the curve (AUC) or F1 score is given.
Accuracy is the percentage of predictions that a spe-cific classifier correctly makes.Sensitivity describes the capability of the classifier to recognize true positives, and specificity indicates that it does not generate a false negative [26].Specificity is defined over the number of false positives (FPs) and true negatives (TNs), whereas precision is the positive predictive value [42].The F1 score based on precision and recall can be calculated with macro-and microaveraging methods.The multiclass F1 score is based on the weighted individual class scores.The macro F1 score is uniformly weighted, whereas the micro F1 score is measured by calculating the overall number of false negatives (FNs), true positives (TPs), and FPs [42].Accuracy and precision (recall) are not able to completely describe the situation in multiclass classification.Additionally, for imbalanced classes, accuracy can be misleading; therefore, precision and recall are of importance, for example, represented by the F1 score.Regardless, the drawback is that the F1 score has no good intuitive explanation [82].Therefore, Cohen's kappa statistic was introduced for imbalanced and multiclass classifications.Cohen's kappa statistic compares the classifier performance to random guessing [82], measuring the agreement between annotators for categorical items statistically [83].An ROC curve represents a classifier's performance at different classification thresholds in a graph, providing a global estimation of the classification ability [26].It is based on the precision and FP rate (1-specificity).
The larger the AUC is, the better the classification performs [26].For multiclass problems, multiple numbers of graphs are needed.Note that validation is performed with (1) k-fold cross-validation (CV); (2) leave-one-out cross-validation (LOOCV), which is favorable; or (3) one specific data split, from which no general conclusions can be drawn.All measurements are not always provided; therefore, it is not always possible to directly compare the results of different methods.Generally, user-independent classification is ideal, i.e., users who are trained on should not be tested on or else the generalizability of the method cannot be guaranteed.This can be realized in methods (1) and ( 2) but needs to be addressed to ensure that the results are trustworthy.

B. SLEEP STAGE CLASSIFICATION
The main goals in sleep stage classification are to (1) automate the process that is normally performed by trained technicians and to (2) make home-based assessment possible.Validation is usually performed against trained human classification, which is not always the best because human classification includes known variability.This is based on the fact that technicians classify specific epochs differently [84], [85].It is especially important to consider the performance on healthy subjects and subjects with medical conditions.In the following paragraphs, approaches using sensory monitoring at home and in the medical domain are discussed.The different technologies and their performances and details can be found in table 4 for home-based sensory data and in table 5 for medical devices, focusing on single-channel approaches such as EEG and ECG as these can potentially be applied at home.The values are recalculated from the confusion matrix or by averaging the given outcome parameters.An ideal approach would be able to distinguish 6 or 5 sleep stages depending on the chosen guideline.Currently, research is mainly focusing on the 5 AASM stages.In [4], MSR accelerometer data from the wrist and ankle and Zephyr BioHarness 3 2 data from the chest were collected in a sleep lab to investigate sleep stages in comparison to PSG measurements.The data were analyzed using RF and deep learning.Deep learning was used for unsupervised feature learning, followed by a deep belief network (DPN) built from stacked restricted Boltzmann machines.The DBN approach achieved a 10-fold CV accuracy of 77.6% for accelerometer data only.The RF method, which fused the data sources of the chest strap and accelerometers, classified 80.7% correctly.A commercial Microsoft Band I sensor was used in [34] to collect heart rate and actigraph recordings from 39 healthy subjects.They proposed a method using multilevel feature learning and an RNN.LOOCV resulted in a precision of 64.5%, recall of 65%, and F1 score of 60.5% in the comprehensive group, where resting and nonresting sleep were included.We will see later that EEG home systems are the most promising as sleep stages were originally defined over brain waves.Using sensors in a home environment that interfere less with sleeping habits are showing good results for using accelerometer data and a chest strap with an RF method.The limitations in 5stage classification are that (1) only healthy participants are considered and (2) the validation datasets are relatively small.Overall good outcomes over all classes can be seen when comparing Cohen's kappa.

b: Four-Stage Classification
Because it is difficult to distinguish N1 and N2, the stages are occasionally fused to light sleep and compared to deep sleep (N3) [86].This results in 4 stages: wake, REM, light, and deep sleep.In [86], continuous positive air pressure (CPAP) flow signals were analyzed to detect sleep stages.High-level features were extracted with CNN and RNN, which were further used in a conditional random field (CRF).An accuracy of 74.1% was reached, but only with a weak Cohen's kappa of 0.57.We can conclude that the dataset is highly imbalanced and cannot detect minority classes sufficiently.Likewise, radio waves can be analyzed by combining CNN and RNN [68].This approach reached a moderate Cohen's kappa of 0.70 with up to 79.8% accuracy for 25 healthy subjects that participated.Ultimately, the advantages of both main deep learning methods were used.Specifically, the CNN was able to separate wake and REM stages, whereas RNN could separate deep and light sleep [68].Instead, accelerometer data were collected in [47] from the nondominant hand.They analyzed different classifiers and performed feature selection, concluding that RC performs the best.The results showed an accuracy of 80% for light sleep and 90% for wake, REM, and deep sleep.The subjects' health status was not provided, but the study is most likely based on healthy participants.In contrast to machine learning approaches, equation threshold-based approaches are also investigated, such as in [87], by recording data from a wrist-worn device that includes a 3-axis accelerometer and a reflective photoelectric volume pulse sensor.The system reached an accuracy of approximately 68.5%, which is generally lower compared to other accelerometer approaches but is validated on a larger database.The commercial ResMed S+ device based on an ultralow-power radio-frequency sensor was analyzed in [54].Respiration amplitude, frequency, and body movement were extracted from the signal.The validation was performed with 3 technicians using a majority voting for an overall score.Forty adults were assessed, with an accuracy of 70% compared to an accuracy of 82% for general scorers.In contrast, the Early Sense sensor based on piezoelectric sensors reached only 64.5% accuracy with a weak Cohen's kappa of 0.54 [53].
An RC approach for accelerometers appears to be promising for four stages with an average 87.5% accuracy [47], but a nonwearable device and deep learning method such as in [68] comes with certain advantages but only 80% accuracy.

c: Three-Stage Classification
Correspondingly, researchers simplify the problem to wake, REM and N-REM stages.In [65], a sound and Doppler radar sensor were combined to detect sleep-wake episodes followed by NREM-REM classification.Different features for each problem were used, reaching an accuracy of 64.4% with RF for patients with sleep disorders.Each step included a personal-adjustment structure, based on a threshold coming from ordering the likelihood ratios from the RF classification.In [66], audio signals from microphones of 250 participants were analyzed with a one-layer NN, obtaining 87.3% accuracy.Moreover, Smart Eye Masks were applied to determine REM and NREM sleep from photoreflectors and accelerometers [61].RF was used, reaching 80% accuracy.In contrast, optical wrist-worn devices were utilized in [49] by applying a trained DT, reaching an overall accuracy of 81.35%.These take into account PPG and a 3axis accelerometer.
Although it is difficult to compare different data sources, it appears that for 3 stages, audio signals in combination with DT perform well, including not only healthy participants.

d: Two-Stage Classification
Wake-sleep classification is often the first step towards finer granularity sleep stage classification.This classification can be performed with PPG [8], accelerometers [9], actigraph units [11], and Shimmer sensors on the bed [10].In [8], sleep-wake stages for 10 patients with sleep apnea were classified by kNN and SVM using a PPG from which heart rate variability and PPG features were extracted.The kNN approach achieved an accuracy of 77.35% for 10-fold CV for HRV, PPG, and feature selection.Twenty-two elderly individuals participated in a study to collect accelerometer data.These data were analyzed using a CNN.The CNN approach was compared to a standard sleep-wake classification approach, increasing the specificity from 54% to 68% while decreasing the sensitivity from 82% to 80% [9].In [10], five Shimmer sensors were applied on the bed and validated against a Philips Actiwatch.Undersampling and oversampling were used to prepare the data for RF methods.The overfitting issue was therefore addressed, achieving results with a sensitivity of 93% and specificity of 86%.Alternatively, a rule-based approach was proposed by Kuo et al. [11] using an actigraph, reaching an accuracy of 92.16%, specificity of 71.3% and sensitivity of 95.02%.They tested the system with 81 subjects, divided in terms of poor and good SE.Four different rules were introduced from movement density and density thresholds.A descriptive analysis was performed in [88].For this purpose, camera recordings were analyzed and validated against actigraphy and PSG.Frame difference and motion history were used to classify motion, which is an indicator of wake episodes.Data from 10 subjects reached 92.13% accuracy for the video-based system in comparison to Actiwatch with 91.24% accuracy.Threshold-based actigraph sleep-wake classification is a powerful method, suggesting the necessity to distinguish between subjects with poor and good SE [11].

2) Sleep Stage Analysis in the Medical Domain
In this section, the focus lies in the automation of sleep stage classification towards home usage with single-channel EEG data.The preprocessing of highly sensitive data is important as artifacts, e.g., from movement, are present, and a large amount of information is available.

a: Six-Stage Classification
Attempts to automate sleep stage scoring were performed in 1996 [84], where an NN model with an uncertainty index was presented that was able to classify 6 sleep stages using EEG, EMG, and EOG.Sixty participants were included: 20 suffering from depression, 20 suffering from insomnia and 20 healthy participants.The results showed accuracies of 84.5% for healthy subjects, 81.5% for subjects with depression, and 81% for subjects with insomnia.These approaches have the limitations of collecting data from various sensor sources and are therefore mainly useful in a hospital environment, whereas single-channel EEG approaches could be easier to use at home in the future.Researchers using single-channel EEG data often use the Physionet Sleep EDF database with 8 subjects for validation.With this, an accuracy of 88.62% for empirical mode decomposition with adaptive boosting and DT [89] can be reached, whereas iterative filtering with RF can reach an accuracy of 90.02% [90], complex-valued nonlinear features and CVANN can reach 91.57% [40], and decomposed two-subband tunable Q-wavelet transform with DT can reach 92.43% [83].
In this setting, NN [40] performs with almost perfect agreement considering Cohen's kappa.We can conclude that preprocessing appears to be a very important aspect to make a single-channel EEG approach have the most accuracy.The limitations lie in the size of the data sample with only 8 subjects, including 4 healthy and 4 participants with mild difficulty falling asleep not diagnosed with sleeping disorders.

b: Five-Stage Classification
The 5-stage classification typically follows the AASM guidelines.For single-channel EEG coming from the Sleep-EDF data, (1) 8 subjects or (2) 20 subjects are investigated.Approach (1) can reach 87.2% accuracy with Elman-RNN [91], 90.11% with DT [89], 91.13% with iterative filtering with RF [90], 93.69% with DT [83], and 93.84% accuracy using CVANN [40].Approach (2) performs with an accuracy of 82% with CNN-LSTM [92] and 83.5% with CNN on a smartphone [93].The data sample of 20 subjects only contains healthy individuals; therefore, it is necessary to further investigate patients suffering from sleep disorders.In [41], 41 healthy participants and 42 participants with insomnia were investigated, reaching an overall accuracy of 77% by applying DNN-HMM.Twenty-eight subjects with sleep apnea were considered in [94], reaching 95.88% accuracy for SVM.A total of 5728 patients from the Sleep Heart Health Study (SHHS) were investigated in [42], and applying a CNN resulted in an accuracy of 87%.In [42], better results could be reached for the Sleep-EDF dataset, which is potentially caused by the small number of technicians that participated.This makes the system learn a specific rater's style, which causes difficulties in generalization.Similar accuracy could be reached by Malafeev et al. [95] with a CNN-LSTM including 18 healthy patients, 23 patients with narcolepsy and 5 patients with hypersomnia.
For single-channel usage, SVM [94] and CNN [42] tested on a large dataset including participants affected with sleep disorders presented promising results, and CVANN [40] performed well on a small dataset.Overall, the N1 stage is often difficult to distinguish [92].This leads to models that concentrate on this issue, such as in [96].Filtered singlechannel EEG signals from 13 participants of the Sleep-EDF database were investigated by SVM, leading to an accuracy of 92.5% in distinguishing N1 and wake stages.Many approaches for sleep stage classification rely on features and preprocessing data, while others use raw data, such as in Malafeev et al. [95].If no CV is performed, the results must be considered with caution, such as in [42], [89].TABLE 4: Home-based sleep stage classification in 30-second intervals following AASM [37]; validated against PSG except [10] against Actiwatch and [61] against a wrist-worn device.Certain performances were recalculated from confusion matrices.Further simplification leads to 3 stages: wake, REM, and NREM (N1, N2, and N3).In this case, a one-channel EEG investigation from Sleep-EDF reached an accuracy of 93.55% with DT [89], 93.9% with DT [83], and 94.6% with RF [90], whereas 184 observations using NNs reached 89.9% accuracy [38].Extending the system with EEG, EOG, and Flow reached 89.6% accuracy for healthy individuals and those with restless legs syndrome and sleep apnea [38].
In contrast, ECG data applying a CNN reached an accuracy of 75.3% for SHHS and 81.6% for 16 subjects with sleep issues [97].

3) Discussion and Suggestions on Sleep Stage Analysis
There are two main areas in sleep stage recognition that target either home-based analysis or sleep stage analysis in the medical domain.Both approaches have individual issues that need to be addressed in the future.
Overall, most methods for home-based assessment have issues with (1) imbalanced data, (2) being unable to correctly classify more complex stages, (3) the limitation of small datasets only including healthy participants and (4) generalizability, caused by non-standardized userindependent classification.It is clear that classifying sleep from wake data is performing well with accelerometers, as movement is the main factor to distinguish these.More complex sleep stages typically require more information, which can be addressed by combining multiple sensors with accelerometers currently tested only on healthy subjects.When reducing the number of sensors, sound is able to distinguish three stages, even for participants with sleep disorders.
For sleep stage analysis in the medical domain, challenges remain for (1) the generalization of the model to the general population affected by diseases and (2) dealing with imbalanced classes.This effect can be seen as methods have lower performance on larger and more diverse datasets.Overall, it appears that single-channel EEG is sufficient to obtain sleep stages; however, the application at home is a future step.In general, online detection is desirable because this can be useful for boosting slow-wave sleep, transcranial stimulation, and acoustic stimulation [85].TABLE 5: Sleep stage classification comparison for single-channel EEG and one from single ECG [97].Stage classification in 30-second epochs except for [98].Performances were recalculated from confusion matrices.
In this section, outcomes are distinguished by wearable and nonwearable devices, as sensors in the medical field are rarely used, such as in [106], [107].A summary can be found in table 6, where different methodologies and their results are listed.

1) Sleep Position Analysis using Wearables
Wearables are often investigated because these devices are easily applicable and provide high accuracy for posture detection.Some systems have almost perfect performance for detecting sleep positions but normally show issues related to the number of participants involved and user-independent detection.
In general, single sensors can detect basic sleep positions well.Shinar et al. [106] used an ECG device, achieving a specificity of 93% and sensitivity of 79% with a k-means iterative algorithm.[107] measured respiration impedance signals and achieved a 99.7% accuracy.
Extending approaches with additional wearable devices can achieve similar outcomes for an even higher number of positions, such as in [15], with 99.8% for LVQ personalized per individual.Other multiple wearable approaches reached an accuracy of 88.5% with RF [104], 83.6% for a general LVQ approach [15], and 92.2% with kNN [103].Barsocchi [23] studied the feasibility of a transmitter and receivers in the sleeping environment to distinguish four main positions, also considering a lateral incline of 30% [15].They could reach 100% accuracy by using at least two sensors and kNN.The best matching rates could be achieved in [23], which has the limitation of a very small sample of two participants, whereas in [15], individual models were trained, which makes generalizing the system more difficult but can distinguish higher granularity positions including leg movement, whereas [103] includes hand movement in the higher granularity position investigation.
The next step is the real-world application, which has been considered in different research studies.Smartwatches, for example, can be applied, such as in [108], where RF performed the best with a TP rate of 91.8%.The most promising models include an accelerometer placed on the chest, reaching an accuracy of 99.5% with LDA [46], and even rule-based approaches can reach 99.2% accuracy [105] including an unknown state.Six positions could be recognized with an accuracy of 97.74% with LVQ, having the drawback of a small data sample and multiple sensors attached.

2) Sleep Position Analysis using Nonwearables
Nonwearables usually need more complex methods for analysis because they often produce images that need to be classified.
Three sleep posture classifications are very common because distinguishing the prone posture from the supine posture is very difficult.Consequently, Hsia et al. [22] exploited pressure at the upper part of the bed to investigate three postures, focusing on the influences coming from hand postures and laying angle with a BC.The result showed a low accuracy of 78.7%, which was influenced by the laying angle.Pressure mats are commonly applied for detection, reaching up to 98.4% accuracy with GMM-kNN [21] and RF [102].Other investigations have used PCA-SVM, resulting in 94.1% accuracy [101], 89.9% with NN-BN [100] and 82.7% with RBM-DNN [99].Hence, simple data analysis models already appear promising.More complex approaches, e.g., hydraulic bed transducers, were used under a mattress to distinguish the four main sleep postures from 58 participants by using an NN [109], also including the prone position.This led to an accuracy of 72%, which is low compared to the approach with pressure distribution and logistic regression (LG) with an accuracy of 90.2%, which only included 3 participants [20].Yousefi et al. [17] utilized a pressure mat to detect five different positions, including supine, yearner, and fetus, from six subjects.The posture detection was based on a three-step algorithm using normalization, eigenspace projection, and a kNN classifier.The average accuracy of this detection reached 97.7%.A mobile, easy applicable solution was investigated in [67].In this case, a pressure-sensitive bedsheet was used to monitor six sleeping positions, including supine, prone, log, and fetus, by sparse classifiers, reaching an accuracy of 83% [67].To obtain a more detailed picture, camera devices for 3-D measurements can be used and have reached an accuracy of 92.5% using SVM [69].Pressure mats can be used to detect higher granularity positions, e.g., Pouyan et al. [16] classified eight different bed postures excluding prone.The proposed algorithm creates a pressure image that is processed using size and shift-invariant images.Classification was performed by computing the Hamming distance between the signature images and the presented sample.The results showed an accuracy of 97.1%.Multiple angles of the three positions could be detected by Ostadabbas et al. [21].They detected 13 sleeping positions with a GMMbased clustering approach, reaching an accuracy of 91.6%.
Real-world applications considering whole nights of data are rarely investigated.However, existing investigations include Kinect devices [24], 3D-Asus Xtion cameras [30], and pressure bedsheets [67].Kinect sensor data were collected to distinguish five sleep positions from 20 students [24], and no blankets were used [15].A single depth camera was able to distinguish supine, left, right, and empty positions.They included 78 patients and obtained results of 94.9% accuracy with a CNN [30].For multiple positions, collecting pressure-sensitive data from a bedsheet over three nights from three people were used, resulting in 86.5% precision and 84.7% recall [67].

3) Discussion and Suggestions on Sleep Position Analysis
Sleep position analysis can be performed for wearable and nonwearable devices in a laboratory or real-world setting.
Overall, wearable accelerometers, particularly on the chest, can reach high accuracy with already simple machine learning models.Alternatively, respiration monitoring also appears to be a promising approach.Although research has investigated different data sources and technologies, an energy-efficient, robust solution that is able to accurately detect finer granularity positions and that is adaptable to individual needs is still lacking.Furthermore, validation on larger data samples is necessary.Wearable devices are commonly used when tracking sleep positions, but as these are worn on the body, discomfort can be present; therefore, improving usability and comfort is of interest [15].
One alternative is the usage of nonwearables; in this context, pressure mats are commonly applied and reach high accuracy with the limitation of distinguishing prone from supine, which was partly overcome in [20], [67].Most recent investigations have attempted to investigate 3D images, which raises privacy concerns.
Research needs to target real-world applications, providing reproducible results that are able to enhance recognition rates for finer-grained positions.Furthermore, userindependent validation needs to become a standard to guarantee generalizability.In the future, other sensor sources will become available and can potentially target more advanced investigations.

D. INVESTIGATION OF SLEEP DISORDERS AND DISEASES
Abnormal sleep behavior was originally classified by sleep experts and further used to diagnose individuals' health status in terms of sleep disorders.Recently, behavior has been investigated in automatic decision making for (1) sleep disorders such as sleep apnea [25]- [27], [110], [111] and insomnia [27] and (2) specific chronic diseases such as diabetes, hypertension, CKD [25], [27], Alzheimer's [32], and Parkinson's disease [33].Established sleep parameters can be used to help investigate disorders and abnormal sleep behavior.The field of using computational behavior analysis in helping diagnose certain diseases is not extensively explored.In this survey, we present approaches that are interesting in our opinion.In [27] and [25], sleep apnea stages were investigated by comparing sleep apnea towards unaffected participants with a wearable actigraph, separating mild stages in [25].The results for two classes showed an accuracy of 68% with a CNN [27] and 81% [25] with an LSTM.An alternative for sleep apnea-hypopnea syndrome diagnosis was investigated with a home-based oximetry sensor in [112].A dataset of 320 subjects was analyzed with different machine learning algorithms, such as LDA, LG, Bayesian multilayer perceptron, and AdaBoost.AdaBoost with LDA performed the best depending on the AHI: for 5 (92.9%), 10 (87.4%), and 30 (78.7%).Chung et al. [113] reached the closest diagnostic ability to the machine learning approach, achieving better accuracy of 93.7% for an AHI of 30, but including only surgical and not regular patients.In [26], two sleep apnea types were analyzed by applying SVM on 125 sets of ECG records, extracting 24 features.This approach reached an accuracy of 92.85%.An optimization problem on kernels led to the conclusion that the polynomial kernel with degree of 3 provides the best results.The research was limited to patients with no history of cardiovascular disease and central sleep apnea.The model could be useful for determining the CPAP therapy by analyzing the change in probabilities in the outcome [26].
It is difficult to compare the approaches because the used data sources and investigated classes are different.Nonwearable devices can recognize sleep apnea events with an accuracy of 70%, but they are outperformed by wearable  CPAP devices are utilized for treating patients suffering from sleep apnea by providing pressure to help them through apnea episodes.In [110], an approach was investigated to detect patients who were likely to discontinue the therapy.CPAP and electronic health records from 3588 patients were used.Feature selection was performed, and oversampling the dataset counteracted the imbalanced distribution.Different techniques were applied, such as linear regression, LR, DT, and SVM, whereby RF and boosting trees such as XGBoost considerably improved the results.Deep learning for time series classification did not present good performance, mainly due to the lack of data.The results showed that XGBoost reaches the best F1 score including health records with 85%, which is an improvement compared to the current state-of-the-art.

2) Chronic Disease Investigations
Chronic diseases affect individuals' lives but also introduce sleep behavior changes [25].These changes are investigated to obtain indications for early and later stages of diseases.
Sleep behavior changes were investigated in [27] and [25], where actigraph data were considered from a broad population to detect insomnia [27], diabetes, hypertension, and CKD [25].In [27], a CNN was applied, introducing a method for embedding activities.In contrast, in [25], an LSTM was investigated, considering the major limitation of an imbalanced dataset in [27].Therefore, a balanced dataset was adopted for training, reaching accuracies of 72.5%, 62%, and 76.7% for diabetes, hypertension, and CKD, respectively [25].In [27], the outcomes were 69% for hypertension and 44% for diabetes.The accuracy for hypertension extraction was higher in [27], but precision and recall values could be improved in [25].This is an important step in obtaining reproducible outcomes.
Early disease detection is very relevant for the diagnosis of Alzheimer's and Parkinson's diseases, which have been shown to be related to sleep [32], [33].Early stages of Alzheimer's disease already affect sleep behavior based on the relation of β-amyloid (Aβ) with sleep quantity and quality manifested in actigraph data [32] [25].Sleep behavior also shows relationships for patients with Parkinson's disease investigated using actigraph data [33] [25].Early disease detection could thrive from these newly elucidated relationships.

3) Suggestions for Disorder and Disease Investigations
In general, it is necessary to investigate and use the existing knowledge of relationships between sleep and certain diseases because this knowledge can enhance and promote self-management and help diagnose diseases at an early stage.Automating sleep disorder diagnoses such as sleep apnea with daily technologies could provide an easy and inexpensive assessment.
With the increasing usage of deep learning technologies that are able to handle larger amounts of data for individual classifications, it is possible to investigate chronic diseases from sleep data.Based on the existing basis of sensor accuracy and availability, the diagnosis of diseases and disorders will be a promising future investigation area with the potential to make early diagnoses possible and accessible at home.

V. CHALLENGES AND FUTURE TRENDS
In recent decades, sleep behavior analysis has advanced considerably by introducing new devices and computational methods; nevertheless, there are still certain limitations and challenges that must be addressed by the research community.Common challenges are (1) the inclusion of sleep behavior differences coming from healthy and sick populations into methodologies; (2) including medical knowledge in terms of sleep structure, relations and influence factors; (3) improving current technologies for home usage; (4) validating on larger and more diverse datasets; (5) addressing imbalanced datasets and their issues; and (6) providing adequate comparative outcomes and standards.
Current research mainly concentrates on automating human scoring tasks on well-known problems such as sleep stage classification.This has some drawbacks because machines have the potential to classify stages better than humans.Human-labeled data are known to be scored differently between sleep experts and cannot reach a 100% match [95].Specifically, this interscorer agreement following the AASM rules is only approximately 82.6% [81].One way to bring new insights into sleep behavior analysis that is not based on classic features is pattern recognition and unsupervised approaches to describe sleep differently.Emerging approaches for sleep assessment are investigating new features, such as the sleep regularity index [75].The regularity of sleep [75] represents the trend of consecutive nights, which is a step towards long-term visualization and helps to draw more specific conclusions.Furthermore, the automatic detection of shorter underlying structures using machine learning techniques is emerging, such as for K-complexes [114] and sleep spindle detection [114], [115].Eventually, research will extract this information from sensor sources other than EEG, which are easier to apply at home.
In the future, the issue of small datasets could be overcome by user contributions, i.e., crowdsourcing sleep data to contribute to sleep research.Consumer wearables will progressively adopt to facilitate users sharing their sleep tracking data with researchers and could be enhanced by users' personal information, e.g., gender, age, and medical conditions.Hence, larger studies can be conducted, and inconsistencies and inherent noise can be overcome to a certain extent.
It is already known that there are many correlations between sleep and daily life, as well as specific chronic diseases, which are not used extensively.Research is being performed to explore features that provide hints about specific diseases.These features can be measured continuously with sensor technology at home.Combining this with the known relations could help diagnose diseases in an early stage [25], [27].The reason for this interest is that people normally learn about issues quite late, which does not allow preventative approaches.Computational analyses could provide insights into sleep data that are not obtainable by currently used methods and therefore target educating and showing users their sleep habits [35], preferably at home.Overall, sleep is very subjective and individual [35]; therefore, individuality should be addressed and transported to developed systems.This will lead to fusing different sleep elements from objective, subjective, and environmental [29] perspectives into an automatic approach for sleep assessment and self-management.Another attempt is to fuse known relations, such as the knowledge from physical activity into sleep research, which can actually improve results, such as in [78].

VI. CONCLUSION
In this paper, we provide a systematic, comprehensive review on the state-of-the-art in research and practices in computational sleep behavior analyses.We specifically focus on the latest developments in sleep monitoring, modeling, and computational analysis methods for sleep assessments using sensor technologies, which can be used by the general public at home and are easier, quicker, and inexpensive.This survey offers in-depth knowledge and insights into this increasingly important research field to effectively guide the reader through vast amounts of literature.We have also highlighted the challenges and future research trends that will inform, inspire, and guide researchers, technology developers, and healthcare practitioners in research, innovation, and service provision.This is a rapidly growing, dynamically changing research area.Whereas previous research has mainly been undertaken to exploit and automate human expert knowledge, one apparent trend is to apply data-driven techniques to investigate data from various perspectives rather than human labeling only, inferring and discovering new insights directly.It is also expected that, with the prevalence and maturity of daily technologies and the availability of cloudbased computational power, the gap between clinic-based and home-based sleep assessments will vanish in the very near future.Whereas this will require close collaborations and knowledge sharing among healthcare professionals, research experts and users, it opens up opportunities that will potentially lead to transformations in future healthcare.

FIGURE 1 :
FIGURE 1: Application area of sensors in the medical field for (a) polysomnography and (b) actigraph device.Figures adapted from [44].(c) Placement of nonwearable sensors in home environments.Figure of bed adapted from [45].

1 )
Home-based Sleep Stage Analysis Wearable and nonwearable devices are investigated for sleep stage classification.a: Five-Stage Classification

TABLE 6 :
[108] position monitoring systems.Ground truth is, if mentioned, based on videos, except for[108], which is based on a smartwatch.