<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">REM Estimation Based on Combination of Multi-Timescale Estimations and Automatic Adjustment of Personal Bio-vibration Data of Mattress Sensor</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Iko</forename><surname>Nakari</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">The University of Electro-Communications</orgName>
								<address>
									<addrLine>1-5-1 Chofugaoka</addrLine>
									<postCode>182-8585</postCode>
									<settlement>Chofu, Tokyo</settlement>
									<country key="JP">Japan</country>
								</address>
							</affiliation>
						</author>
						<author role="corresp">
							<persName><forename type="first">Naoya</forename><surname>Matsuda</surname></persName>
							<email>matsuda.naoya@cas.lab.uec.ac.jp</email>
							<affiliation key="aff0">
								<orgName type="institution">The University of Electro-Communications</orgName>
								<address>
									<addrLine>1-5-1 Chofugaoka</addrLine>
									<postCode>182-8585</postCode>
									<settlement>Chofu, Tokyo</settlement>
									<country key="JP">Japan</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Keiki</forename><surname>Takadama</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">The University of Electro-Communications</orgName>
								<address>
									<addrLine>1-5-1 Chofugaoka</addrLine>
									<postCode>182-8585</postCode>
									<settlement>Chofu, Tokyo</settlement>
									<country key="JP">Japan</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">REM Estimation Based on Combination of Multi-Timescale Estimations and Automatic Adjustment of Personal Bio-vibration Data of Mattress Sensor</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">71AA37D6F4DBD06B5CB64D897E8C34CE</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-23T20:23+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>This paper proposes the novel REM estimation method based on the combination of REM estimations with multitimescale logarithmic spectrums calculated from overnight bio-vibration data acquired from mattress sensor. Concretely, this paper learns each Random Forests for multiple scale spectrums, and counts the number of REM estimation in the length of the window, and estimates REM if the counted number exceeds the threshold. The threshold is automatically determined based on the REM estimation ratio to the total sleep length for each person to consider individual differences. Through the human subject experiments, the following implications have been revealed: (1) the combination of RFs learned with each scale spectrum improves the Precision and Recall of REM estimation, and Accuracy, Precision, Recall and Specificity are 80.2%, 51.4%, 47.0% and 48.5%, respectively; and (2) the automatic adjustment of the threshold can be flexibly adapted to data with large individual differences without the need to retrain the model.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Introduction</head><p>According to the survey conducted by the Ministry of Health, Labour and Welfare, it is estimated that about one in three Japanese adults feel sleepy during the day at least three times a week. In addition to that, Japan has the shortest sleep time among the OECD member countries (Organization for Economic Cooperation and <ref type="bibr">Development 2019)</ref>, which suggests that many people in Japan are sleep-deprived. The accumulation of sleep deprivation (especially4-6 hours of sleep) leads to a state of sleep debt. In the state of sleep debt, the ability to think and make decisions is equivalent to staying up all night <ref type="bibr" target="#b8">(Van Dongen et al. 2003)</ref>, and it is a factor in the increased risk of industrial and traffic accidents. It also decreases immune function and increases the risk of developing lifestyle-related diseases such as depression and dementia <ref type="bibr" target="#b4">(Mullington et al. 2009;</ref><ref type="bibr" target="#b3">Holingue et al. 2018)</ref>. For individuals to stay healthy and for the government to reduce health care costs, these sleep problems should be solved as soon as possible.</p><p>To solve these sleep problems, it is important to increase the amount of sleep time, but many people suffer from the problem of poor sleep quality even if they sleep for a long time. For the facts, it is necessary to understand sleep quality. The standard method for measuring sleep quality (sleep stage) is to evaluate biological data acquired by Polysomnography (PSG) test based on the Rechtschaffen &amp; Kales (R&amp;K) method <ref type="bibr" target="#b6">(Rechtschaffen and Kales 1968</ref>). However, the PSG test is a highly restrictive method and requires a person to attach multiple electrodes to his/her head and body, which burdens physical and mental on his/her and prevents obtaining data of sleep as usual. To address the problems, the demand for sleep stage estimation methods by simple sensors (such as mattress sensors) has increased as an alternative to the PSG test. For example, Watanabe developed a mattress sensor and focused on the relation between heart rate variability and sleep stage <ref type="bibr" target="#b10">(Watanabe and Watanabe 2004</ref>). The accuracies of the method are reported as follows: 42.8% in three stages (NREM/REM/WAKE) estimation; 82.6% in NREM estimation; 70.5% in WAKE estimation; and 38.3% in REM estimation. As the results show, the accuracy of the method is not high, especially the accuracy of REM sleep estimation. This is because that REM sleep estimation is mainly based on rapid eye movements in the R&amp;K method, and mattress sensors cannot measure eye movements. Even though REM sleep has other characteristics (i.e., unstable heart and respiration rate) acquired from the mattress sensor, it is hard to estimate REM sleep because of the following points. (1) The characteristics that appear in REM sleep appear intermittently rather than all the time during REM sleep. (2) The heart rate gets unstable by body movements.</p><p>(3) The heart rate is easily affected by individual differences and daily physical condition.</p><p>To tackle the problems, it is necessary to estimate REM sleep from a new perspective, including physiological characteristics. However, since we do not know what to focus on, machine learning (ML) is a good way to estimate REM sleep from a new perspective. In this study, Random Forests <ref type="bibr" target="#b0">(Breiman 2001</ref>) is employed for the ML model because it is easier to analyze what the model learned from the data than deep learning <ref type="bibr" target="#b2">(Goodfellow et al. 2016)</ref>, which is widely employed because of its high prediction accuracy. It is essential for analyzing models easier because it leads to the interpretability of the model in the future. However, it cannot deal with the problem (1) mentioned before by applying the ML to sleep stage estimation because each epoch (30 seconds) is estimated without considering before/after the corresponding epoch. Due to this, it is difficult to estimate REM sleep when the characteristics do not appear at the epoch. In addition to that, the ML is not good at learning ___________________________________ data with individual differences.</p><p>To overcome these problems, this paper aims to improve the accuracy of REM sleep estimation and proposes the novel REM sleep estimation method with a mattress sensor that can consider before/after the corresponding epoch and be automatically adjusted the REM sleep estimation threshold for each person. Concretely, this paper employs TANITA sleep scan SL511 (Japan) as the mattress sensor for acquiring bio-vibration data, and prepares several RFs for learning multi-timescale logarithmic spectrums. It is combined that the REM sleep estimations by each RF for the final output of estimation, and the estimation sensitivity is automatically adjusted based on the REM sleep estimation ratio out of all epochs in an overnight sleep.</p><p>This paper is organized as follows. The next section describes the sleep mechanism especially REM sleep. Section 3 describes the related works of non-contact sleep stage estimation and RF which is the main ML method in our proposed method and Section 4 proposes our multiple scales REM estimation method. The experiment is conducted in Section 5 and the result are analyzed in Sections 6. Finally, our conclusion is given in Section 7.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Sleep Mechanism Sleep Stage</head><p>The sleep stage is an indicator of the depth of sleep defined by the R&amp;K method. The depth of sleep is classified into six stages in each epoch (30 seconds), i.e., WAKE, REM, Non-REM1 (N1), N2, N3, and N4 (N4 is often included in N3). The proportion of each sleep stage in healthy young adults per night is as follows: WAKE is 1-5%; REM is 15-25%; N1 is 5-20%; N2 is 45-75%; and N3 is 10-22% (depending on age and physical condition on that day). In order to determine the sleep stage, the R&amp;K method needs biological data such as electroencephalography (EEG), electrooculogram (EOG), and electromyogram (EMG) acquired by the PSG test. Figure <ref type="figure" target="#fig_1">1</ref> shows the example of the overnight sleep stages, where the vertical axis indicates the sleep stage and the horizontal axis indicates the time. As shown in Figure <ref type="figure" target="#fig_1">1</ref>, the structure of the sleep stage in a healthy person repeats deep sleep (N3 sleep) and shallow sleep (above N3 sleep) alternately, and the regular sleep repeats this cycle (about 90 to 120 minutes) three to five times a night. Each cycle is connected by about 20 to 30 minutes of REM sleep, and this cycle is called the ultradian rhythm.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Characteristics of REM Sleep</head><p>The physiological characteristics of REM sleep are as follows:</p><p>• rapid eye movement;</p><p>• decreased skeletal muscle activity;</p><p>• increased or unstable heart rate and respiratory rate;</p><p>• changes in autonomic function. In particular, REM sleep is determined by focusing on "rapid eye movement" and "decreased skeletal muscle activity" in the R&amp;K method. This is because that the two characteristics are clearly expressed in the biological data acquired by the PSG test and are easy to evaluate. Note that these characteristics occur intermittently, rather than continuously.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Related Works</head><p>Sleep Stage Estimation by mattress sensor <ref type="bibr">Watanabe et al. tried</ref> to extract the relation between the change in the heart rate and sleep stages through the frequency band containing the multiple biological rhythms of a human to build a foundation of sleep stage estimation from heart rate variability (HRV) <ref type="bibr" target="#b9">(Watanabe and Watanabe 2001)</ref>. They focused on two biological rhythms that the ultradian rhythm and the circadian rhythm, which is an approximate 25 hours cycle. From their study, the relations between the frequency of HRV and sleep stage have been revealed, and they built a sleep stage estimation method based on the heart rate data acquired from the air mattress sensor <ref type="bibr" target="#b10">(Watanabe and Watanabe 2004)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Random Forests</head><p>This study employs Random Forests (RF) <ref type="bibr" target="#b0">(Breiman 2001</ref>). The RF model repeats random sampling from training data, randomly construct decision trees with different conditional branches, and classify them by majority rule of those results. In this research, Gini impurity is the splitting condition, it becomes low when all the samples contained in each node of the decision tree are the same. RF processing is as follows:</p><p>1. Generate bootstrapped sample (S j ) from training data set (S). 2. One-third of the original data is called Out-Of-Bug (OOB), and it is used for constructing decision tree. Each node processing is as follows:</p><p>(a) Extract m try features randomly with not allowing duplicate value. (b) Choose the feature that minimizes Gini impurity, and divide nodes.</p><p>3. Repeat 1. to 2. N tree times.</p><p>Where N tree is the number of decision trees to be constructed. In the classification problem, it is recommended to use the square root of the total number of features for the variable m try , which used to divide the nodes of decision trees.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Proposed Method: Multi-Timescale REM Estimation</head><p>The proposed method, Multi-Timescale REM estimation starts from learning several RFs with each scale biovibration data, then combines REM predictions by each RF,   </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Input data</head><p>To extract characteristics of bio-vibration data by the ML, the frequency analysis is applied for decomposing each vibrations (i.e., heartbeats, respiration and body movement) to frequencies. This process is conducted as follows.</p><p>1. Applying the Fast Fourier Transform (FFT) <ref type="bibr" target="#b1">(Cooley and Tukey 1965)</ref> to the bio-vibration data in a L-second window to convert the data to a power spectrum (note that the sampling frequency of the mattress sensor is 16Hz, and data size is L × 16). In this study, window size (L) is set as next for capturing several scales of REM. L = {32, 64, 128, 256}. According to the sampling theorem (Shannon 1949), the frequency that can be analyzed by FFT is up to 8Hz, so that the data size of power spectrum is L×8, and the frequency resolution is 1/L Hz. Figure <ref type="figure" target="#fig_3">2</ref>(a)</p><p>shows the example of power spectrum (L = 64) calculated from bio-vibration data, where the vertical axis indicates the density of power spectrum and the horizontal axis indicates the frequency. In particular, the frequency band between 0.1Hz and 0.3Hz is related to the respiration, and the frequency band between 0.6Hz and 1.5Hz is related to the heartbeats. Regarding the BM, the larger/smaller BM, the higher/lower density of the power spectrum. However, as shown in Figure <ref type="figure" target="#fig_3">2</ref>(a), it is difficult to understand the shape of the power spectrum above 1Hz because of the high density of frequencies below 1Hz. 2. In order to make it easier to understand above 1Hz and for RF to learn, power spectrum is converted into a logarithmic spectrum (log10). the density (logarithmic value) of the spectrum and the horizontal axis indicates the frequency. Furthermore, the density of each frequency in the logarithmic spectrum is normalized to 0, 1 based on the value of the density of the overall frequency. 3. This logarithmic spectrum is calculated per 30-second (stride size is 30-second) and labeled with the correct sleep stage (REM/Not-REM) determine by R&amp;K method for RF to learn. Figure <ref type="figure" target="#fig_4">3</ref> shows the example of strides (window size is 128 seconds) and how to label sleep stage to the spectrum. When labeling sleep stage to the spectrum, bio-vibration data often have multiple sleep stages, so that, in this study, the sleep stage which is labeled to the spectrum is determined by a majority vote of the proportions occupied by those sleep stages. Note that, when using RF for REM prediction (not learning phase), the logarithmic spectrum is not labeled with the correct sleep stage, and the output of the prediction is for first epoch.</p><p>The number of the input data that can be calculated from one subject (in case of seven hours of sleep) is about 840.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>REM estimation based on multiple scales spectrum</head><p>Figure <ref type="figure">4</ref> shows the overview of the proposed Multi-Timescale REM Estimation. optimal TH = i 20: end for but in clusters (successive epochs), in order to consider the state before/after the epoch wanted to estimate, the method prepare a window to count PC for N e epochs before/after the epoch, which called Windowed Prediction Count (WPC) as shown in bottom of Figure <ref type="figure">4</ref>(2).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Automatic adjustment of REM estimation threshold:</head><p>The finally output of the proposed REM estimation for an epoch is determined by the value of WPC. If the WPC exceeded a certain threshold, then the epoch is detected as REM sleep, as shown in the Figure <ref type="figure">4</ref>(3). It has a proportional relationship between the size of the threshold and the REM estimation ratio, which means the ratio of estimation out of all epochs in an overnight sleep (without considering correct and incorrect answers). According to the physiological characteristics of sleep, the proportion of REM sleep per overnight sleep is about 20%, so that the proposed method explores the threshold which the REM estimation ratio is about 20% for each person to avoid excessive or negative estimation.</p><p>The algorithm of exploring optimal threshold is described in Algorithm 1 The algorithm counts the number of epoch detected as REM sleep by a threshold in overnight sleep, and calculate the REM estimation ratio, while the REM sleep count is equal to 0 (see line 6 to 13). Then, the optimal threshold is extracted as the previous threshold where the REM estimation ratio exceeds 25% (see line 15 to 20).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Experiments</head><p>To investigate the effectiveness of the proposed Multi-Timescale REM Estimation, this paper conducted the human subject experiment of the nine of healthy subjects. The performance of the REM estimation is compared with RFs learned with each window size of logarithmic spectrum. The information of subjects is summarized in Table <ref type="table" target="#tab_1">1</ref>. setup</p><p>The electrodes were attached to the body and head of each subject to acquire EEG, EOG and EMG, and mattress sensor was placed under the mattress in the bed to acquire biovibration data in one night. After sleep, the correct sleep stages for each subject were determined according to the R&amp;K method based on the data measured by PSG (helped by medical specialist), and the bio-vibration data measured by mattress sensor is converted to logarithmic spectrums of several scales (i.e., window sizes are L = {32, 64, 128, 256, 512}) of which are labeled with the correct sleep stage in each epoch.</p><p>The logarithmic spectrum of each scale is learned with different RFs from each other. The training data is generated from the eight subjects, and the validation data is the other subjects. The ratio of REM sleep and not-REM sleep of training data is 1:3 because REM sleep accounts for 20% of one night sleep and to prevent excessive REM estimation. The data which have large BM are excluded because it affect the shape of the spectrum and difficult to learn with RF. The parameters of RF are set as follows: (i) the maximum depth of decision tree is 10; (ii) the number of decision tree is 50; (iii) the number of the features employed to construct the decision tree is 16, 23, 32, 46 and 64 for window size 32, 64, 128, 256 and 512 respectively. The window size N e for counting WPC is set as 3.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Results</head><p>Table <ref type="table" target="#tab_2">2</ref> shows the results of REM estimations. The column "Type of RF" indicates the RF learned with each window size of spectrum and rows "proposed 1" and "proposed 2" are the combination of multiple RF results, and the other   <ref type="table" target="#tab_2">2</ref>, the Accuracy, Precision, Recall and Fmeasure are getting high rate as window size of spectrum getting wide, but when window size of spectrum is too wide (i.e., 512 sec.), these evaluation indicators get worsen than any other results. The reason why the value of Specificity in 512 seconds is most largest than any other results is that the REM estimation ratio of the RF leaned with 512 seconds is small (i.e., the REM estimation is passive). Focusing on the results of two proposed methods, the values of Accuracy, Recall and F-measure outperform any other results (i.e., single RF leaned with each window size of spectrum). The values of Precision and Specificity are not the best among the result but these values are close to the best. In addition, the REM estimation ratio is larger than any other results, and the ratio is close to the average ratio of REM sleep per one night (about 20%). The standard deviation of each evaluation indicators are smaller for the proposed method 2, which considers individual differences, than for the proposed method 1, which does not considers individual differences, and this fact suggests the results are stable for each subject.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Discussion</head><p>How the combination of multiple RF results contributes? On the other hand, the actual not REM sleep areas tend to have few REM estimations. Based on the proposed method, the number of REM estimations by each RF in a window interval of 3 epochs (1.5 minutes) before/after is shown in Figure <ref type="figure">6</ref>. In Figure <ref type="figure">6</ref>, the left and right vertical axes indicate the number of windowed REM prediction count (WPC) and sleep stage, respectively, the horizontal axis indicates the time, and the orange and blue lines indicate the WPC and correct sleep stage, respectively. As shown in Figure <ref type="figure">6</ref>, the WPC tends to be high in the areas of the actual REM sleep, and it tends to be low in that of actual not REM sleep. The proposed method (the combination of multiple RF results) exploits this tendency and estimates REM sleep when the WPC exceeds a certain threshold. The threshold for REM estimation in the proposed method was determined by the sensitivity analysis of REM estimation threshold as shown in the Figure <ref type="figure" target="#fig_9">8</ref>, where the vertical axis indicates the percentage, horizontal axis indicates the threshold, and blue, orange, gray, yellow, purple and green lines indicate Accuracy, Precision, Recall, F-measure, Specificity and REM estimation ratio, respectively. From the figure, the smaller the threshold value, the higher the REM estimation ratio, and the better the estimation of the actual REM sleep (as shown in the Figure <ref type="figure" target="#fig_9">8</ref>, Recall), while the larger the threshold value,   the lower the REM estimation ratio and the better the estimation of actual not-REM sleep (as shown in the Figure <ref type="figure" target="#fig_9">8</ref>, Specificity). In this study, the threshold value (= 2) was chosen based on the Precision and Recall are almost equal and F-measure is the largest. However, this threshold is susceptible to individual differences (e.g., age and physical condition on the day) and must be carefully determined for each subject.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Consideration of individual differences in the proposed method</head><p>As mentioned above, this section discusses the importance of the threshold setting in the proposed method with subject "I" who have to set a significantly different threshold compared to other subjects. Figure <ref type="figure">7</ref> shows the number of WPC of subject I, where the left and right vertical axes indicate the number of REM estimations and sleep stage, respectively, the horizontal axis indicates the time, and the orange and blue lines indicate the WPC and correct sleep stage, respectively. Compared to the results of subject "E" in Figure <ref type="figure">6</ref>, the WPC of subject "I" is excessive, and it is not desirable to set a threshold of the same value. To deal with the individual differences the proposed method focused on the physiological characteristics about sleep that REM sleep accounts for about 20% of the total sleep in one night.</p><p>Table <ref type="table" target="#tab_4">3</ref> shows the thresholds and results that were automatically adjusted for each subject so that the REM estimation ratio to the overall sleep time is about 20%. In the Table <ref type="table" target="#tab_4">3</ref>, the column "ID (Age)" indicates the subject ID and age, the columns "TH" and "REM estimation ratio" indicate the threshold (the value is an integer) for REM estimation and REM estimation ratio (the value is percentage) based on the threshold. The other columns indicate each evaluation indicators (the value is a percentage). Each threshold is set to a value close to 20% without the REM estimation ratio exceeding 25%. As shown in Table <ref type="table" target="#tab_4">3</ref>, the thresholds for all subjects, except subject "I", are set between 1 and 4. If the threshold value of 4 is given to the subject "I" like the other subjects, the REM estimation ratio will be 86.1% and the Accuracy, Precision, Recall, F-measure and Specificity will be 35.9%, 25.7%, 99.4%,40.9% and 17.7%, respectively. This situation should be avoided in real applica- In general, to improve the accuracy of the estimation for such data, it is necessary to retrain the model by collecting similar data or devising new input features, which are difficult tasks and take a long time to do. By contrast, the proposed method does not need to do these things to improve the accuracy, and the only thing needed to do is set the REM estimation threshold. In addition, the threshold can be automatically determined based on the REM estimation ratio so that the proposed method makes it easy to adapt to individual differences. Therefore, the differences in the automatically determined thresholds, as shown in column TH of Table <ref type="table" target="#tab_4">3</ref>, represent individual differences. Since the heart rate is increased or unstable during REM sleep, it can be inferred, for example, that if the value of the threshold is high, heart rate of overnight may be higher or more unstable than an average person.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Conclusion</head><p>This paper proposed the novel REM estimation method that combination of multiple RF learned with different timescale of spectrums and investigates its effectiveness through comparison of the REM estimation by single RF learned with each scale spectrums. Concretely, the proposed method learns several RFs with each scale spectrums, then counts the number of REM estimation in the length of the window and estimates REM sleep if the counted number exceeds the threshold. Furthermore, the threshold is automatically determined for each person based on the REM estimation ratio to the overall sleep time for considering individual differences. The results of the human subject experiments, the Accuracy, Precision, Recall and Specificity of the REM estimation are 80.2(±5.5)%, 51.4(±15.0)%, 47.0(±15.5)% and 48.5(±13.7)%, respectively. Through experiments, the following implications have been revealed: (1) the combination of RFs learned with multiple window sizes spectrum separately improves the Precision of REM estimation and Recall of that, rather than RF learned with only a particular window size spectrum; (2) the automatic adjustment of the threshold based on the REM estimation ratio to the total sleep length can be flexibly adapted to data with large individual differences without the need to retrain the model. The future task is following: (1) to investigate the validity of the combination of multiple RFs; (2) to validate whether it is effective for other sleep stages.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head></head><label></label><figDesc>In T. Kido, K. Takadama (Eds.), Proceedings of the AAAI 2022 Spring Symposium "How Fair is Fair? Achieving Wellbeing AI", Stanford University, Palo Alto, California, USA, March 21-23, 2022. Copyright © 2022 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: Example of the overnight sleep stage.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 2 :</head><label>2</label><figDesc>Figure 2: Examples of (a) power spectrum and (b) logarithmic spectrum (L = 64).</figDesc><graphic coords="3,180.81,57.72,105.71,60.28" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>Figure 3 :</head><label>3</label><figDesc>Figure 3: Example of strides and how to label sleep stage to the spectrum.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head></head><label></label><figDesc>Figure 4: Overview of Multi-Timescale REM Estimation.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_6"><head>Figure 5 :</head><label>5</label><figDesc>Figure 5: Estimation result of subject "E".</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_7"><head>Figure 5</head><label>5</label><figDesc>Figure5shows the estimation result of subject E, where the vertical axis indicates sleep stage (WAKE, REM, NREM12,</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_8"><head>Figure 6 :Figure 7 :</head><label>67</label><figDesc>Figure 6: The number of windowed REM prediction count (WPC): subject "E".</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_9"><head>Figure 8 :</head><label>8</label><figDesc>Figure 8: Sensitivity analysis of REM estimation threshold in the proposed method.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head></head><label></label><figDesc>REM estimation ratio for each threshold 2: W P C list[ ]: WPC for each epoch in overnight sleep 3: N EPOCH: Number of epoch in overnight sleep 4: current T H ⇐ 1: Start to explore from 1 5: IS CONTINUE⇐ true 6: while IS CONTINUE do</figDesc><table><row><cell>7:</cell><cell>REM COUNT ⇐ count epochs detected as REM</cell></row><row><cell></cell><cell>from W P C list</cell></row><row><cell>8:</cell><cell>r list.append(REM COUNT / N EPOCH)</cell></row><row><cell>9:</cell><cell>if REM COUNT is equal to 0 then</cell></row><row><cell>10:</cell><cell>IS CONTINUE = f alse</cell></row><row><cell>11:</cell><cell>end if</cell></row><row><cell>12:</cell><cell>current T H++</cell></row><row><cell cols="2">13: end while</cell></row><row><cell cols="2">14: optimal TH: Optimal threshold found by the exploring</cell></row><row><cell cols="2">15: for i = 0 to r list.length−1 do</cell></row><row><cell>16:</cell><cell>if r list[ i] &gt; 0.25 then</cell></row><row><cell>17:</cell><cell>break</cell></row><row><cell>18:</cell><cell>end if</cell></row><row><cell>19:</cell><cell></cell></row><row><cell></cell><cell>The flow of the method is as</cell></row><row><cell></cell><cell>follows: (1) preparing RFs for a number of scales (each</cell></row><row><cell></cell><cell>window size spectrum), and learning each scale spectrum</cell></row><row><cell></cell><cell>by each RF; (2) combining the number of REM predictions</cell></row><row><cell></cell><cell>by each RF in each window (note that, this window is dif-</cell></row><row><cell></cell><cell>ferent from window size of spectrum); (3) exploring opti-</cell></row><row><cell></cell><cell>mal threshold for REM estimation from overnight data, and</cell></row><row><cell></cell><cell>REM sleep is detected when the number of REM predictions</cell></row><row><cell></cell><cell>in a window counted in (2) exceeds the threshold.</cell></row></table><note>Combining REM predictions by each RF: Our method outputs four REM predictions for each epoch from RF of 32 sec., 64 sec., 128 sec. and 256 sec., and the REM Prediction Count (PC) is counted for each epoch as shown in top of Figure 4(2). Since REM sleep do not occur singly (one epoch) Algorithm 1: Exploring optimal threshold 1: r list[ ]:</note></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head>Table 1 :</head><label>1</label><figDesc>Information of healthy subjects.</figDesc><table><row><cell cols="6">ID (Age) WAKE REM N1 N2 N34 Total</cell></row><row><cell>A (20's)</cell><cell>46</cell><cell>176</cell><cell cols="2">41 421 164</cell><cell>848</cell></row><row><cell>B (20's)</cell><cell>53</cell><cell>113</cell><cell>48 368</cell><cell>2</cell><cell>584</cell></row><row><cell>C (30's)</cell><cell>103</cell><cell>184</cell><cell>35 382</cell><cell>0</cell><cell>704</cell></row><row><cell>D (40's)</cell><cell>75</cell><cell>65</cell><cell>46 419</cell><cell>2</cell><cell>607</cell></row><row><cell>E (40's)</cell><cell>44</cell><cell>85</cell><cell>53 390</cell><cell>23</cell><cell>595</cell></row><row><cell>F (40's)</cell><cell>34</cell><cell>121</cell><cell>40 225</cell><cell>0</cell><cell>420</cell></row><row><cell>G (40's)</cell><cell>53</cell><cell>110</cell><cell>80 407</cell><cell>1</cell><cell>651</cell></row><row><cell>H (50's)</cell><cell>35</cell><cell>249</cell><cell>56 520</cell><cell>0</cell><cell>860</cell></row><row><cell>I (60's)</cell><cell>98</cell><cell>159</cell><cell>27 436</cell><cell>0</cell><cell>720</cell></row><row><cell cols="6">The column "ID (Age)" indicates the ID of the subject and</cell></row><row><cell cols="6">age of that. The columns from "WAKE" to "N34" indicate</cell></row><row><cell cols="6">the number of epochs in each sleep stage (WAKE, REM,</cell></row><row><cell cols="6">NREM1, NREM2 and NREM34), and the column "Total"</cell></row><row><cell cols="6">indicates the total number of epochs in one night. The av-</cell></row><row><cell cols="6">erage number of epochs (30 seconds) of sleep is 664±130.</cell></row><row><cell cols="6">As evaluation criteria, this study employs five evaluation in-</cell></row><row><cell cols="6">dicators, Accuracy, Precision, Recall, F-measure and Speci-</cell></row><row><cell cols="6">ficity of REM estimation. In addition, this study evaluates</cell></row><row><cell cols="6">the REM estimation ratio to see if REM estimations are be-</cell></row><row><cell cols="4">ing made at an appropriate frequency.</cell><cell></cell><cell></cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_2"><head>Table 2 :</head><label>2</label><figDesc>Reaults of REM estimation by RFs learned with each window size and the proposed method. Values are expressed as mean ± standard deviation.</figDesc><table><row><cell>Type of RF</cell><cell>Accuracy</cell><cell>Precision</cell><cell>Recall</cell><cell>F-measure</cell><cell cols="2">Specificity REM estimation ratio</cell></row><row><cell>32 sec. window</cell><cell cols="5">74.1 ± 8.5 33.0 ± 21.3 9.8 ± 13.6 11.3 ± 10.3 91.5 ± 12.2</cell><cell>8.8 ± 12.3</cell></row><row><cell>64 sec. window</cell><cell cols="5">76.0 ± 7.1 38.5 ± 21.3 12.9 ± 18.9 14.2 ± 12.3 92.9 ± 11.6</cell><cell>8.4 ± 13.3</cell></row><row><cell>128 sec. window</cell><cell cols="5">76.6 ± 8.3 47.3 ± 14.8 20.6 ± 16.5 24.8 ± 9.8 91.5 ± 12.3</cell><cell>11.0 ± 13.3</cell></row><row><cell>256 sec. window</cell><cell cols="5">78.0 ± 7.8 52.8 ± 20.8 24.5 ± 17.4 29.9 ± 12.6 92.0 ± 11.2</cell><cell>11.6 ± 12.4</cell></row><row><cell>512 sec. window</cell><cell cols="2">76.3 ± 5.9 25.8 ± 16.8</cell><cell>4.6 ± 3.8</cell><cell>7.2 ± 5.3</cell><cell>95.6 ± 4.4</cell><cell>4.5 ± 4.1</cell></row><row><cell>Proposed 1 (same TH (= 2))</cell><cell cols="5">79.0 ± 8.1 52.8 ± 20.7 55.4 ± 21.3 51.1 ± 16.4 84.9 ± 9.8</cell><cell>23.3 ± 11.1</cell></row><row><cell>Proposed 2</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell>(consider individual)</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_4"><head>Table 3 :</head><label>3</label><figDesc>The results of proposed method considering the individual differences (the row "proposed 2" in Table2) in detail.</figDesc><table><row><cell cols="8">ID (Age) TH REM estimation ratio Accuracy Precision Recall F-measure Specificity</cell></row><row><cell>A (20's)</cell><cell>3</cell><cell>17.2</cell><cell>87.0</cell><cell>73.1</cell><cell>60.2</cell><cell>66.0</cell><cell>94.1</cell></row><row><cell>B (20's)</cell><cell>4</cell><cell>19.4</cell><cell>72.4</cell><cell>29.5</cell><cell>29.2</cell><cell>29.3</cell><cell>83.0</cell></row><row><cell>C (30's)</cell><cell>3</cell><cell>19.4</cell><cell>77.8</cell><cell>60.7</cell><cell>44.6</cell><cell>51.4</cell><cell>89.7</cell></row><row><cell>D (40's)</cell><cell>2</cell><cell>9.3</cell><cell>84.8</cell><cell>23.2</cell><cell>21.3</cell><cell>22.2</cell><cell>92.0</cell></row><row><cell>E (40's)</cell><cell>1</cell><cell>19.6</cell><cell>87.4</cell><cell>54.8</cell><cell>74.1</cell><cell>63.0</cell><cell>89.7</cell></row><row><cell>F (40's)</cell><cell>4</cell><cell>20.1</cell><cell>77.7</cell><cell>63.9</cell><cell>46.1</cell><cell>53.5</cell><cell>89.9</cell></row><row><cell>G (40's)</cell><cell>4</cell><cell>20.0</cell><cell>84.0</cell><cell>52.7</cell><cell>61.8</cell><cell>56.9</cell><cell>88.6</cell></row><row><cell>H (50's)</cell><cell>1</cell><cell>21.1</cell><cell>72.7</cell><cell>54.4</cell><cell>39.4</cell><cell>45.7</cell><cell>86.4</cell></row><row><cell>I (60's)</cell><cell>20</cell><cell>20.2</cell><cell>78.0</cell><cell>50.7</cell><cell>45.9</cell><cell>48.2</cell><cell>87.2</cell></row><row><cell cols="4">tions, and the proposed method makes the REM estimation</cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell cols="4">with fewer wrong estimation by the condition that the keep</cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell cols="2">the REM estimation ratio around 20%.</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row></table></figure>
		</body>
		<back>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Random forests</title>
		<author>
			<persName><forename type="first">L</forename><surname>Breiman</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Machine learning</title>
		<imprint>
			<biblScope unit="volume">45</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="5" to="32" />
			<date type="published" when="2001">2001</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">An algorithm for the machine calculation of complex Fourier series</title>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">W</forename><surname>Cooley</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">W</forename><surname>Tukey</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Mathematics of computation</title>
		<imprint>
			<biblScope unit="volume">19</biblScope>
			<biblScope unit="issue">90</biblScope>
			<biblScope unit="page" from="297" to="301" />
			<date type="published" when="1965">1965</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<monogr>
		<title level="m" type="main">Deep learning</title>
		<author>
			<persName><forename type="first">I</forename><surname>Goodfellow</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Bengio</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Courville</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Bengio</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2016">2016</date>
			<publisher>MIT press Cambridge</publisher>
			<biblScope unit="volume">1</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Disturbed sleep and diabetes: A potential nexus of dementia risk</title>
		<author>
			<persName><forename type="first">C</forename><surname>Holingue</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Wennberg</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Berger</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><forename type="middle">Y</forename><surname>Polotsky</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">P</forename><surname>Spira</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Metabolism</title>
		<imprint>
			<biblScope unit="volume">84</biblScope>
			<biblScope unit="page" from="85" to="93" />
			<date type="published" when="2018">2018</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Cardiovascular, inflammatory, and metabolic consequences of sleep deprivation</title>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">M</forename><surname>Mullington</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Haack</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Toth</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">M</forename><surname>Serrador</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><forename type="middle">K</forename><surname>Meier-Ewert</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Progress in cardiovascular diseases</title>
		<imprint>
			<biblScope unit="volume">51</biblScope>
			<biblScope unit="issue">4</biblScope>
			<biblScope unit="page" from="294" to="302" />
			<date type="published" when="2009">2009</date>
			<publisher>Organization for Economic Cooperation and Development</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<monogr>
		<ptr target="https://www.oecd.org/gender/data/" />
		<title level="m">Gender Data Portal</title>
				<imprint/>
	</monogr>
	<note>GENDER EQUALITY</note>
</biblStruct>

<biblStruct xml:id="b6">
	<monogr>
		<title level="m" type="main">A Manual of Standardized Terminology, Techniques and Scoring System for Sleep Stages of Human Subjects</title>
		<author>
			<persName><forename type="first">A</forename><surname>Rechtschaffen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Kales</surname></persName>
		</author>
		<imprint>
			<date type="published" when="1968">1968</date>
			<pubPlace>Washington DC</pubPlace>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Communication in the presence of noise</title>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">E</forename><surname>Shannon</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Proceedings of the IRE</title>
		<imprint>
			<biblScope unit="volume">37</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="10" to="21" />
			<date type="published" when="1949">1949</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">The cumulative cost of additional wakefulness: dose-response effects on neurobehavioral functions and sleep physiology from chronic sleep restriction and total sleep deprivation</title>
		<author>
			<persName><forename type="first">H</forename><surname>Van Dongen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Maislin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">M</forename><surname>Mullington</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><forename type="middle">F</forename><surname>Dinges</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Sleep</title>
		<imprint>
			<biblScope unit="volume">26</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="117" to="126" />
			<date type="published" when="2003">2003</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Estimation of the sleep stages by the non-restrictive air mattress sensor relation between the change in the heart rate and sleep stages</title>
		<author>
			<persName><forename type="first">T</forename><surname>Watanabe</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Watanabe</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Transactions of the Society of Instrument and Control Engineers</title>
		<imprint>
			<biblScope unit="volume">37</biblScope>
			<biblScope unit="issue">9</biblScope>
			<biblScope unit="page" from="821" to="828" />
			<date type="published" when="2001">2001</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">Noncontact method for sleep stage estimation</title>
		<author>
			<persName><forename type="first">T</forename><surname>Watanabe</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Watanabe</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Transactions on biomedical engineering</title>
		<imprint>
			<biblScope unit="volume">51</biblScope>
			<biblScope unit="issue">10</biblScope>
			<biblScope unit="page" from="1735" to="1748" />
			<date type="published" when="2004">2004</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
