# A Study on ML-Based Sleep Score Model Using Lifelog Data
## 4 Discussion  
This study presented a model for grading sleep habit level considering various sleep dimensions. First, the quality of sleep was defined as an index indicating the level of sleep habits, and data for good sleep, intermediate sleep, and bad sleep were classified according to the cutoffs of previous studies. Based on the logistic regression model used in the credit rating model, a model for estimating the likelihood of occurrence was derived using lifelog factors that affect good and bad sleep. Specifically, the process of categorizing various sleep features generated from lifelog datasets, estimating probability of occurrence of each sleep state with the logistic regression model and evaluating the predictive power of the model were discussed. The primary sleep habit score was derived by grading and classifying sleep habit levels based on the PDO (points to double the odds) concept using the derived model. This study aimed to derive the sleep habit level for all sleep states by learning the primary sleep habit \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Sleep Score**} & \multirow{2}{*}{\begin{tabular}{c} **Number of Data** \\ **Points** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Proportion of** \\ **Data** \\ \end{tabular} } & \multirow{2}{*}{\
\begin{tabular}{c} **Frequency of** \\ **Good Sleep** \\ **Status** \\ \end{tabular} } & \multirow{2}{*}{
\begin{tabular}{c} **Good Sleep** \\ **Status** \\ \end{tabular} } \\ \hline  
Total & 16,053 & 100.00\% & 326 & 2.03\% \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Table of data distribution and ratio of good sleep states by score. score derived using a machine learning algorithm to generate the sleep habit index for intermediate sleep states. Summarizing the characteristics of the sleep habit score derived from this study, the midpoint of sleep is between 2 a.m. and 4 a.m., the start time of sleep is between 10 p.m. and 12 a.m., and the walking activity in the evening increases the probability of receiving a high score. Also, the higher the Sleep Regularity Index (SRI), the higher the probability of good sleep. Previous studies were reviewed to verify the validity of the methodology. It was confirmed that the results of this study were consistent with the results of previous studies. [PERSON] (2022) [55] claimed that the average SRI value was 81.4 to 88.8, and [PERSON] (2021) [56] found that the higher the SRI (94 points), the more regular the sleep state, and the lower the SRI (34 points), the more irregular the sleep. It is similar to the results of this study that the higher the SRI, the higher the probability of being in a good sleep state. [PERSON] (2020) [57] investigated the correlation between sleep variability and health, and confirmed that high sleep variability has a negative effect on health. [PERSON] (2017) [58] found that higher sleep variability can negatively affect sleep quality, which is consistent with the results of this study. [PERSON] (2014) [59] suggested that there was no relationship between evening exercise and sleep quality. [PERSON] (2019) [60] found that vigorous exercise one hour before bedtime could negatively affect sleep onset, total sleep duration, and SE, but found no evidence that evening exercise negatively affects sleep, in fact rather the opposite. [PERSON] (2021) [61] argued that activity 2 to 4 h before bedtime does not affect sleep quality in healthy young and middle-aged adults. This is similar to the result of this study that walking activity for 2 h before sleep increases the probability of being a good sleep state. In addition, this study generated various features through gait and sleep data, and in the study of [PERSON] (2022) [62], various step and sleep features were generated through lifelog data and body weight were predicted through these features. [PERSON] (2019) [63] also generated various sleep features, and medical-grade sleep/wake classification was predicted with a tree-based model.