PM 2 : A Partitioning-Mining-Measuring Method for Identifying Progressive Changes in Older Adults ’ Sleeping Activity

As people age, their health typically declines, resulting in difficulty in performing daily activities. Sleep-related problems are common issues with older adults, including shifts in circadian rhythms. A detection method is proposed to identify progressive changes in sleeping activity using a three-step process: partitioning, mining, and measuring. Specifically, the original spatiotemporal representation of each sleeping activity instance was first transformed into a sequence of equal-sized segments, or symbols, via a partitioning process. A data-mining-based algorithm was proposed to find symbols that are not present in all instances of a sleeping activity. Finally, a measuring process was responsible for evaluating the changes in these symbols. Experimental evaluation conducted on a group of datasets of older adults showed that the proposed method is able to identify progressive changes in sleeping activity.


INTRODUCTION
Over the past several decades, most countries have witnessed a demographic trend tending towards more and more elderly people [1].As people age, older adults typically experience physical, cognitive, and mental health declines, eventually resulting in long-term care such as home visits, assisted living, residential care, and/or long stays in hospitals.
Sleep problems are common in an aging population and take a variety of forms.More than 20% of older adults suffer from chronic insomnia [2,3], characterized by difficulty in achieving and maintaining sleep [4].In addition to insomnia, a study conducted by the National Institute on Aging with over 9000 older adults (mean age = 74 years) showed that chronic sleep complaints often cause difficulty in initiating or maintaining sleep (43%), nocturnal waking (30%), insomnia (29%), daytime napping (25%), trouble falling asleep (19%), waking too early (19%), and waking without feeling rested (13%) [5].
Sleep problems have a variety of causes, including disease.Common diseases in older adults that are linked with sleep problems include arthritis, osteoporosis, Parkinson's disease, heart disease, lung diseases [6], and Alzheimer's disease [7][8][9].Neurodegenerative diseases such as Parkinson's disease and Alzheimer's disease are chronic and progressive.While their symptoms generally worsen over time, the rate of deterioration is different from person to person [10].A method for recognizing and assessing the progression of such symptoms, including sleep problems, is extremely important for providing care for older adults suffering from such chronic diseases.
Self-reported questionnaires are a subjective assessment frequently used to assess sleep quality and insomnia, including the Pittsburgh Sleep Quality Index [11], Insomnia Severity Index [12], Epworth Sleepiness Scale [13], and the Roland and Morris Disability Questionnaire [14].While self-reported questionnaires are brief, easy-to-administer and cost-effective, the subjectivity of definitions of sleep problems and the absence of a gold standard to diagnose most sleep problems make it challenging to examine the validity of self-reported questionnaires [15].
Another line of research tries to develop objective assessment by utilizing tools such as polysomnography (PSG) and actigraphy to collect information on sleep behaviour and sleep physiology, providing measures of both sleep and wake time in addition to classification of sleep stages [16].While such an objective measure would be ideal, the clinical utility of actigraphy is still suboptimal in older adults treated for chronic primary insomnia [17].Furthermore, both PSG and actigraphy can only be used in a clinical or laboratory setting, making it less than ideal for monitoring the progression of sleep problems at home.
Longitudinal home monitoring of sleep avoids certain limitations of the laboratory PSG, such as the atypical sleeping environment and the single-night snapshot.Sleep is a dynamic process that varies from day to day, and hence it is important to measure multiple nights of sleep for medical, research, and wellness reasons [18].A vast amount of research has been reported on home sleep-monitoring, based on increasingly advanced sensing and computing techniques.A range of off-the-shelf devices and prototype systems can now monitor sleep-related parameters via capturing and analyzing brain activity signals (e.g., iBrain [19] and Zeo [20]), respiratory and cardiac signals (e.g., Heally Recording System [21] and M1 [22]), body/limb movements (e.g., SleepTracker [23] and WakeMate [24]), and other solutions such as the MagIC System [25] and AMON [26].In addition, bed-based sleep monitoring has also been widely explored, such as Air Cushion [27], Emfit Bed Sensor [28], Home Health Station [29] In each dataset, an activity is represented as a series of sensor events that were generated from various sensors installed in rooms (e.g., temperature sensors in the bedroom), attached to objects (e.g., switch sensors on the cabinets), and mounted on walls (e.g., motion sensors by doors).Older adult participants performed daily activities in their normal way, generating a series of sensor readings for each activity.The sensor readings can be binomial or numerical, depending on the type of sensor.For example, a motion sensor generates an ON (OFF) value when the resident approaches (leaves) it, while a temperature sensor generates a numerical value of the current temperature.The sensor reading combined with the date and time information constitutes a sensor event recording, as shown in Figure 1(a).Further, the datasets have been annotated to indicate the beginning and ending of an activity.
When more than one resident lived in an apartment, the datasets separately document the activities of different residents.Since the datasets were collected mainly for the purpose of activity recognition, anomaly detection, and behavior pattern analysis, a large portion of the activities contain only a small number of recordings.
Since the objective of this work is to explore finding progressive changes in the sleep of older adults, only the data related to instances of sleeping activity from the original datasets were selected for the test dataset.To be included in the test dataset, a participant's data must have at least 20 instances of sleeping.There were 10 such participants in the original datasets.However, two of the participants had such a large number of instances of sleeping (more than 60 each), that their data were split into 2 subsets in order to have a total of 12 sets of sleeping data.
For the purpose of quantitatively evaluating the proposed method, ground truth had to be determined for the test dataset.To do this, three volunteers manually labeled each of the 12 sets of test data as having a progressive change in sleeping activity or not.The volunteers comprised of one male retired gerontologist aged 70 years, one female teacher aged 56 years, and one female graduate student aged 22 years.Before the labelling process, each sleeping instance of a test set was plotted to obtain a visualized representation like Figure 1 For all visualized instances of a test set, all three volunteers were instructed to intuitively observe if there was a gradually changed trend on the beginning and/or ending times of these instances.If at least two of the three volunteers marked a participant's test data as containing a progressive change over time, the data set were labeled as such.Table 1 presents a summary of the test dataset.An intuitive explanation for variables s min , s max , e min , and e max in Table 1 can be found in Figure 1(b).Additionally, parameter s ts denotes the calculated size of timeslot according to Equation 2, which will be introduced in the next section.An illustration of the collected sleeping activity data in the original datasets.(a) A documented sleeping activity recording with the date, time, sensor reading (value), and annotated beginning and ending.(b) A group of activity recordings represented by the spatial dimension (i.e., activity instance) and temporal dimension (i.e., beginning and duration), with the x-axis indicating the time in the timeline (ranging from 22:00 to 12:00) and the y-axis indexing the instances of sleeping for a single participant, where s min , s max , e min , and e max are the minimum of the beginning times, maximum of the beginning times, minimum of the ending times, and maximum of the ending times, respectively.

PM2: A Partitioning-Mining-Measuring Identification Method
This section presents the proposed PM2 (Partitioning-Mining-Measuring) method, consisting of three main steps for identifying progressive change in sleeping activity.

Partitioning: from Spatiotemporal Signature Series to Equal-sized Symbols
This section first provides a formal definition of sleeping activity, and the partitioning process is then described to transform an original instance of sleeping activity into a sequence of equal-sized symbols.Definition 1.A sleeping activity, A sleep , is a spatiotemporal triple, where  1(b).
Sleeping activities periodically occur in different periods (i.e., days), and virtually all sleeping instances have different beginning times and durations (see Figure 1).Even if there exists a trend in which sleeping times and durations are shifting over time, any two subsequent instances may not adhere to this overall trend.For example, while Figure 1(b) shows an overall shift of sleeping beginning time to the left (from bottom to top), there are several instances that shift to the right compared to the prior recordings.This phenomenon makes it difficult and timeconsuming to find differences among sleeping instances by directly comparing them.To automatically detect this progressive trend, it is necessary to first transform the original spatiotemporal instances of a sleeping activity into an appropriate representation by using a partitioning process consisting of the following three operations: Timeline Windowing: Windowing a timeline means to decompose this timeline into a series of timeslots based on a carefully chosen timeslot size.The size is crucial for the performance and efficiency of the proposed method.This is because a large (small) size will lead to a sparse (dense) decomposition of the timeline, resulting in too many (few) segments while mapping a sleeping instance onto this decomposed timeline.In general, the number of the segments is positively associated with the time elapsed in finding differences among sleeping instances, and some subtle yet important differences will not be detected if there are only a small number of segments in each instance.This paper defines a data-driven size for a timeslot in Equation 2: (2) where Equation 2 means that when all instances of a sleeping activity have a uniform distribution, i.e., e max -e min AE 0 and s max -s min AE 0, a high value for s ts can be obtained (i.e., s ts AE D/∆) to lead to a sparse decomposition of the timeline; otherwise, a small value for s ts is obtained, corresponding to a dense decomposition of the timeline.
With the size calculated by Equation 2, the timeline can be decomposed into a series of timeslots.It is worth noting that the decomposed timeline is determined by all instances of a sleeping activity; hence, there may be difference among sleeping datasets of different older adults.
Instance Segmenting: Segmenting an instance of a sleeping activity means to first map this instance onto the decomposed timeline and then to symbolically represent this instance using the mapped timeslots.Let (L i , T i , D i ) be the i-th instance of a given sleeping activity.After mapping this instance onto the decomposed timeline, a set of timeslots (later referred to as symbols) {sl r , sl r+1 , ..., sl k } can be obtained, where sl j (r ≤ j ≤ l) indexes the (k -j + 1)-th segment which has been mapped into the j-th timeslot.Therefore, triple (A i , T i , D i ) can be represented as a symbolized sleeping activity instance, Ä sleep , using the mapped timeslots as follows: In order to determine the terminal segments like sl r and sl k , the majority principle is used to make them valid if the terminal segments cover half of the length of the mapped timeslots, or these segments should be invalid and discarded without any negative impact (as shown in Figure 2).
Segment Encoding: To improve scalability of the proposed method in identifying progressive changes in sleeping activity, the user and instance ID need to be added to the tuples in Equation 3 to encode each segment as a quadruple.For example, tuple (L i , sl r ) can be encoded as (U, I, L i , sl r ), where U and I indicate the user (older adult) and the instance, respectively (see Figure 2).
The last issue that should be considered in partitioning a sleeping instance is the possible gaps in the original spatiotemporal representation caused by some interleaved behaviors, such as sleep-to-toilet behavior.The gaps will be filled to make the original instance continuous if they are small (e.g., less than the calculated size s ts ).In the selected test dataset, all instances were originally continuous or have become continuous after this filling process.Filling gaps in an instance is completed after s ts is computed, but before partitioning.

Mining: Finding Non-everpresent Symbols
Given a set consisting of all the symbolized sleeping activity instances, S = {Ä 1 , Ä 2 , ..., Ä n }, obtained by partitioning the original instances {A 1 , A 2 , ..., A n }, this section proposes a data-mining-based algorithm to discover differences among these instances by finding non-everpresent symbols.Definition 4. A symbol s is non-everpresent if its pr-value is less than 1, where pr is calculated by Equation 4. Otherwise, s is an everpresent symbol; i.e., its pr-value is equal to 1.
(4) where s(I) is the set of symbolized instances that contain the symbol s, and n is the number of the instances in the set S.
As depicted in Figure 3, the pr-value of a symbol s measures the proportion of instances that it is present in (i.e., the instances in s(I)), and the m-value points out the median instance in s(I).A non-everpresent symbol s tells the truth that this symbol is not present in all instances; i.e., s(I) is only a proper subset of the universal set S. The m-value of a symbol s is equal to the ID of the median instance if the number of the instances in s(I) is odd; otherwise, it is equal to the average of the IDs of two most median instances.For example, s 4 and s 5 obtain an m-value of 7 and 6.5 (i.e., the average of 6 and 7), respectively, as shown in Figure 3(b).
Intuitively, all instances in Figure 3(a) collectively demonstrate a sleep beginning time that is shifting to later in the evening.Similarly, the m-values of the first 10 noneverpresent symbols show a gradually increased trend.This inspires the development of pr-value-and m-value-based metrics to measure progressive change.Thus, the first task becomes finding non-everpresent symbols from a given dataset of symbolized instances, which is achieved by the current algorithm.
The algorithm begins with a process of creating a test symbol set, T, by choosing all non-repetitive symbols from the given set S. For example, suppose S consists of three instances, Ä 1 = {s 1 , s 2 , s 3 }, Ä 2 = {s 2 , s 3 , s 4 }, and Ä 3 = {s 1 , s 2 , s 3 , s 4 }, the test set for these instances is T = {s 1 , s 2 , s 3 , s 4 }.For instances depicted in Figure 3(a), T = {s 1 , s 2 , ..., s 36 } with the first symbol s 1 being mapped into the 5th timeslot of the decomposed timeline.
The algorithm then builds a binary tree structure T bt for T which can improve efficiency when finding non-everpresent symbols and will be described below.If there is at least one symbol in T bt , the algorithm extracts a symbol, one symbol at a time, and records this symbol in s (line 3 and 4 of the current algorithm).If s is Journal of Healthcare Engineering • Vol. 5 • No. 2 • 2014 located between two everpresent symbols in T bt , of which the process is explained below, s will be directly recognized as an everpresent symbol needing no further processing (line 5 to 10).At this time, s obtains a pr-and m-value of 1 and Median(1...n), respectively, according to Definition 4 and Equation 4. The pr-and m-value for s will be stored into the corresponding locations (indexed by l) in vector P and M, respectively.Otherwise, the algorithm will search S using the extracted symbol s to find instances in S which contain symbol s (line 11) and compute its prand m-value, as well as record these computed values into vector P and M, respectively.Finally, the algorithm outputs the computed pr-and m-value recorded in P and M for each symbol in T.

Algorithm to Detect Non-everpresent Symbols
Input: S -A set consisting of n symbolized instances Output: P -A vector used for recording pr-values of non-everpresent symbols M -A vector used for recording m-values of non-everpresent symbols Process 1. T ← finding non-repetitive symbols from n symbolized instances // creating a test symbol set T 2. T bt ← building a binary tree for symbols in T 3. if T bt is not empty, then 4.
s ← extracting a symbol from T bt 5.
if s is located between two found everpresent symbols, then 6.
P(l) ← pr // l is the index of s in T 9.
M(l) ← m // l is the index of s in T 10. else 11.
searching S using s to find instances that s is present in 12.
calculating pr-and m-value using Equation 4 13.
P(l) ← pr // l is the index of s in T 14.
M(l) ← m // l is the index of s in T 15. end if 16. end if The following provides the process for creating the binary tree structure T bt for the test symbol set T, which enables an efficient implementation of the current algorithm.
Building a Binary Tree for Symbols in T: A binary sort tree T bt will be constructed to achieve an efficient search in line 5 of the current algorithm, based on a test symbol set.Consider a test symbol set T = {s 1 , s 2 , ..., s 13 }, with the recursive process for creating T bt shown in Figure 4(a).At each stage, the current set is divided into two sub-sets at the central element, and elements which have an index less than the central one fall into the left sub-tree while those with indexes larger than the central one fall into the right sub-tree.The dividing process proceeds until only one element remaining in the current set.These elements become leaves in the tree (e.g., s 2 , s 4 , s 6 , s 9 , s 11 , and s 13 ).The central element s c of a set {s i ,..., s j } is determined by c = Î(i + j) / 2˚.For example, the first central element is s 7 (i.e., 7 = Î(1 + 13) / 2˚) and the third central one is s 10 (i.e., 10 = Î(8 + 13) / 2˚).
Binary-Tree-Based Prejudgment of Everpresent Symbols: Based on the binary tree, T bt , an efficient criterion is provided for recognizing some everpresent symbols utilizing a Breadth First Search (BFS) approach.As illustrated in Figure 4(b), after the first two symbols, s 7 and s 3 , are extracted and recognized as everpresent after searching the set S, s 5 , s 4 , and s 6 are determined to be everpresent symbols because they are located between two known everpresent symbols s 3 and s 7 in set T. The same happens for s 8 and s 9 once s 10 is identified as everpresent.In total, five symbols out of eight, (i.e., s 4 , s 5 , s 6 , s 8 , and s 9 ), are identified as everpresent symbols without examining instances in the set S. Therefore, the binary-tree-based identification of everpresent symbols can significantly improve the time performance of the proposed algorithm, thus improving the efficiency of the data mining based method.

Measuring: Calculating Total Change and Overall Trend
The pr-value of a symbol s indicates whether s is a non-everpresent symbol and the degree to which s is non-everpresent.The m-value, on the other hand, reflects the association between s and the instances that this symbol is present in by identifying  the median instance in which it is present.In brief, non-everpresent symbols are the indicators of progressive change in a sleeping activity.Thus, the core task is to develop the proper metrics that are able to measure the total change and overall trend collectively maintained by all non-everpresent symbols found.
Figure 5 provides the pr-value and m-value curves for a sleeping activity encompassing 26 instances.The first nine and the last five symbols are noneverpresent (pr-value < 1), and one can see their total progressive change through the area of the pr-value curve in Figure 5 pr-value-Based Area Metric for Total Change: Suppose there are i continuous noneverpresent symbols with pr-values of (p 1 , p 2 , ..., p i ), a curve p(x) = (p 1 , p 2 , ..., p i , 1) can be generated by using these i points and an additional point that corresponds to the first everpresent symbol with pr-value of 1.The area above the p(x) curve (AAC) can be used to measure the total change level by Equation 5. (5) where ∆x = 1.
As shown by the shaded area in Figure 5(a), the larger the AAC value, the larger the total change level.In order to examine that how many symbols in the set, T, contribute to the AAC value defined in Equation 5, the normalization of AAC is defined below: where T is the created test symbol set mentioned in Section 2.2.
m-value-Based Distance Metric for Overall Trend: Similarly, suppose there are i continuous non-everpresent symbols with m-values of (m 1 , m 2 , ..., m i ), a curve m(x) = (m 1 , m 2 , ..., m i , m d ) can be generated by using these i points and an additional point that corresponds to the first everpresent symbol, where m d refers to the ID of the median instance of S and can be calculated by Equation 4. The distance between the m(x) curve and a baseline line l(x) can be used to measure the overall change trend and calculated as below: (7) where l(x) is a baseline line related to the curve m(x), and d = (m d -m 1 ) / i.
As depicted in Figure 5(b), the lower the Dist value, the smaller the distance between m(x) and l(x).The slope of l(x) is crucial to measuring progressive change in sleeping activity: a large value for the slope of l(x) corresponds to a sudden change, while a small value corresponds to a gradual change.Based on this consideration, it is necessary to define the normalization of Dist as below: (8) where k l denotes the slope of the baseline line l(x).
For a sleeping activity to have progressive change, it needs to have a large value for AAC N and a small value for Dist N , simultaneously.In other words, a progressive change is positively correlated with AAC N but negatively correlated with Dist N , which leads to a synthetic (or final) metric CHG P defined below:

RESULTS
An experimental evaluation was performed for the proposed method using the test dataset in Table 1.The experiments were run in Matlab on an Intel Core E8400 PC with 2GB RAM running Windows XP.

Quantitative Analysis
Table 2 presents the CHG P values calculated based on all middle metrics in Table 3 according to Equation 9for each test set in Table 1, where the metrics AAC, AAC N , Dist, Dist N , and k l in Table 3 are defined by Equations 5-8, respectively.In general, a sleeping activity has two groups of non-everpresent symbols which are separated by a group of everpresent symbols; i.e., the non-everpresent symbols always lie at the ends rather than the middle of a symbolized sleeping activity instance.Therefore, each set has a CHG P value for its left (beginning of sleep) and right (ending of sleep) noneverpresent symbols, respectively.In other words, the CHG P Left (Right) in Table 2 is the calculated CHG P value for the first (second) group of the found non-everpresent symbols for each test set.
Based on a comparison with the ground truth of progressive sleep changes (manually labeled by three volunteers who only identified a sleeping activity contained a progressive change without showing how many changes were contained in the sleeping activity), Table 2 includes columns indicating if the left and right CHG P value correctly identified a progressive change.In addition, the number of the symbols contained in the set T (T bt ) for each of the test sets has also been provided.
Using a threshold of 0.005 for the CHG P value, the left CHG P value correctly identified all five sets of sleep data with progressive sleep changes, while the right CHG P value identified two.There were no false-positives.

Result Visualization
Figure 6 presents the visualization for three sets of sleep data in the test dataset (D_01, D_06, and D_07) by providing the original spatiotemporal instances, the pr-value and the m-value curves.These three sets are presented because each of them reflects one or more potential representative patterns of progressive change in sleeping activity of older adults, including an overall shift of beginning time to the right in Figure 6(a_i) and 6(b_i), an overall shift of beginning time to the left in Figure 6(c_i), and an overall shift of ending time to the left in Figure 6(b_i) and 6(c_i), where instances in each test set are indexed in a bottom-to-top manner.Obviously, there is no a regular pattern on the ending time of instances in Figure 6(a_i).On the other hand, the areas above the p(x) curve (AAC) corresponding to the first 13 symbols in Figure 6(a_ii), the first 9 symbols in Figure 6(b_ii), and first 13 and last 10 symbols in Figure 6(c_ii) are all large.At the same time, their corresponding m(x) curves show a progressive trend in Figures 6(a_iii), 6(b_iii) and 6(c_iii), respectively.Therefore, these sleeping activities are identified as containing progressive changes according to Equations 5-9, with large values for CHG P shown in Table 2.
It is worth noting that the last 5 symbols in Figure 6(b_ii) show a relatively smaller AAC value compared to the first 9, but they are recognized as containing progressive change.The reason lies in their linear trend in Figure 6(b_ii); i.e., they obtain both a large AAC value and a small Dist value simultaneously, hence a large CHG P value.Similarly, despite a large AAC value for the first 13 symbols against the one of the last 10 symbols in Figure 6(c_ii), there is still a smaller CHG P value (left = 0.0076) for them than the one (right = 0.0116) due to the relatively poor trend in Figure 6(c_iii).For the last 12 symbols in Figure 6(a_ii), despite large value for AAC, they are still identified to contain no progressive change because of the irregular trend in Figure 6(a_iii), hence the small CHG P value of 0.0011.Similar visualizations for other datasets are not presented due to space limitation.

Time complexity: Binary-Tree-Based Prejudgment vs. Scanning Search
Figure 7 presents an analysis of the time performance of the proposed method.The binary-tree-based prejudgment and the scanning method are compared by analyzing the CPU time consumption in finding non-everpresent symbols.The scanning method works by orderly extracting symbols from the set T rather than T bt and using each extracted symbol to search all instances in the set S to determine if it is noneverpresent symbol or not, while binary-tree-based prejudgment constructs a binary tree in order to reduce the search time by prejudging some everpresent symbols without the need of examining the set S.
As depicted in Figure 7(a), the elapsed CPU time for each dataset is smaller by using the binary-tree-based prejudgment than using the scanning method, with a total CPU time of less than 0.15 seconds for all sets.This is because using binarytree-based prejudgment, for each set, a number of everpresent symbols have been prejudged before searching all instances in the set S to determine if an extracted symbol is everpresent or not; i.e., there is no longer a searching process for those prejudged symbols.As shown in Figure 7(b), the everpresent symbols identified using the prejudgment mechanism is more than 53% of the total number of everpresent symbols, whereas the everpresent symbols identified using the binary search tree is more than 20% of the total number of symbols (everpresent and noneverpresent) for all sets of the test dataset.The number of the symbols that have been identified using the binary-tree-based prejudgment and the total symbols in T for each set, with the x-axis indicating the datasets and the y-axis denoting the number of the total symbols in each dataset.

DISCUSSION
Based on the quantitative results combined with the visualizations as presented in Table 2 and Figure 6, the proposed method is shown to be able to identify progressive changes in sleeping activity of older adults.All manually labeled progressive changes in sleeping activity have been identified with lager CHG P values compared to those not containing a progressive change.
Intuitively, the instances of sleeping activity depicted by Figure 6(a_i) display a gradually delayed beginning, whereas the ones depicted by Figure 6(b_i) simultaneously display a gradually delayed beginning and an earlier ending.The sleeping activity instances illustrated by Figure 6(c_i) show a gradually advanced beginning and ending.Therefore, their corresponding symbols obtain an obviously large CHG P value, i.e., (left = 0.0077), (left = 0.0248, right = 0.0091), and (left = 0.0076, right = 0.0116), respectively.The other two sleeping activities with manually identified progressive changes also have a large CHG P value (D_02: left = 0.0158) and (D_08: left = 0.0056), with D_02 having a gradual shift on the beginning times to earlier, and D_08 having a gradual shift on the beginning times to later (data not presented due to space limitation).Such gradual shifts of the beginning and ending times are considered progressive changes in sleep of older adults.
Taking into account the quantitative results in Table 2 and visualization in Figure 6, a sleeping activity can be labeled to have a progressive change if it achieves a CHG P ≥ 0.005; the larger the CHG P value, the larger the progressive change.Moreover, a sleeping activity may encompass more than one part with a progressive change (i.e., the beginning and the ending times); therefore, each part requires its own CHG P value.Despite differences among elderly individuals, progressive changes in older adults' sleeping activities fall into four different patterns: • GDB pattern: All instances of a sleeping activity collectively maintain a Gradually Delayed trend in their Beginning times (GDB).• GDE pattern: All instances of a sleeping activity collectively maintain a Gradually Delayed trend in their Ending times (GDE).• GAB pattern: All instances of a sleeping activity collectively maintain a Gradually Advanced trend in their Beginning times (GAB).• GAE pattern: All instances of a sleeping activity collectively maintain a Gradually Advanced trend in their Ending times (GAE).
Figure 8 presents an illustration of the patterns defined above.It is worth noting that, in older adults' real life, these patterns can occur individually or in their combinations.For example, the sleeping activity in Figure 6(a) follows the GDB pattern, the sleeping activity in Figure 6(b) follows the GDB and GAE patterns, and the sleeping activity in Figure 6(c) follows the GAB and GAE patterns simultaneously.
The low CPU time consumption, as illustrated in Figure 7, suggests that the proposed method is efficient and feasible when it is applied to analyze real-world sleeping activity data that may be collected from elderly individuals for several years in our future research.Also, this method can be adapted to analyze other types of activities which may have larger datasets and require a more efficient processing.
There are three primary limitations of the present study.First, the proposed algorithm is based on an assumption that no gaps exist in the original sleeping activity recordings, or any gaps that do exist are filled using a filling process (see Section 2.1.1).In reality, however, older adults may have disrupted sleep from which they awake (e.g., to go to the bathroom), and stay awake for a long period of time.The sleep-related behaviors with longer gaps may indicate other types of sleep disturbances which are not detected by the current work.Second, each of the test datasets consists of a small sample of the sleeping activity instances (i.e., ≤ 30 instances in each dataset).It is not clear if the proposed algorithm will be able to observe and identify a progressive change that occurs over a larger timeframe.Finally, the test data do not include any information about the health condition of the older adult participants, making it impossible to further analyze the relationship between progressive change in one's sleeping activity and his/her health condition over time.
In future research, we plan to extend this work in several directions.First, we intend to further evaluate the performance of the proposed method using data collected from an ongoing, integrated service platform system for older adults, and improve this method based on the feedback from real older adult users.Secondly, we plan to explore the association between progressive changes in sleeping activity and older adults' health status using large-scale sleeping activity data.Thirdly, we would like to explore a proper method to deal with the middle shift (with longer gaps) in sleeping activity.And lastly, we will attempt to extend the proposed method to identify progressive changes of other activities of daily living, not necessarily limited to the elderly population.

CONCLUSION
Sleep-related problems are common and varied in an aging population, resulting in a large number of adverse impacts on an older adult's health.Focusing on the common problems of shifts in circadian rhythms, this paper have proposed a three-step method which integrates partitioning, mining, and measuring to identify progressive changes in sleeping activity of older adults, along with experimental results.Quantitative results and time performance analysis conducted on real sleep data of older adults showed that the proposed method is feasible and effective in identifying progressive changes in older adults' sleeping activity, with a low time complexity.
(b), where 26 instances are plotted.208 PM2: A Partitioning-Mining-Measuring Method for Identifying Progressive Changes in Older Adults' Sleeping Activity

Figure 1 .
Figure 1.An illustration of the collected sleeping activity data in the original datasets.(a) A documented sleeping activity recording with the date, time, sensor reading (value), and annotated beginning and ending.(b) A group of activity recordings represented by the spatial dimension (i.e., activity instance) and temporal dimension (i.e., beginning and duration), with the x-axis indicating the time in the timeline (ranging from 22:00 to 12:00) and the y-axis indexing the instances of sleeping for a single participant, where s min , s max , e min , and e max are the minimum of the beginning times, maximum of the beginning times, minimum of the ending times, and maximum of the ending times, respectively.

Figure 2 .
Figure 2. The process of partitioning the original spatiotemporal instances into sequences of symbols.(a) The original spatiotemporal instances, the x-axis denoting the time in timeline and the y-axis indexing the instances.(b) The partitioned instances consisting of sequences of symbols, with the x-axis indexing the timeslots in a decomposed timeline and the y-axis indexing the symbolized instances.

Figure 3 .
Figure 3.The non-everpresent symbols and their pr-values and m-values.(a) The symbolized sleeping instances, with the x-axis indexing the timeslots in the decomposed timeline (the symbols are marked with s 1 , s 2 , ..., s 36 ) and the yaxis indexing the symbolized instances.(b) The first 10 non-everpresent symbols with their pr-and m-values.

Figure 4 .
Figure 4.The process of creating a binary tree structure for symbols in set T and the process for finding non-everpresent symbols based on the proposed new structure.(a) The binary tree, T bt , for set T = {s 1 , s 2 , ..., s 13 }.(b) The searching process based on T bt , where the dotted arrow line indicates the searching path based on an assumption that symbols {s 3 , ..., s 10 } are everpresent.

d 5 .
Figure 5.The pr-value and m-value curves obtained by the current algorithm for a sleeping activity including 26 instances.(a) The pr-value curve, with the xaxis indexing the symbols and the y-axis denoting the pr-value.(b) The mvalue curve, with the x-axis indexing the symbols and the y-axis denoting the m-value.
Partitioning-Mining-Measuring Method for Identifying Progressive Changes in Older Adults' Sleeping Activity 220PM2: A Partitioning-Mining-Measuring Method for Identifying Progressive Changes in Older Adults' Sleeping Activity

Figure 6 .
Figure 6.Sleeping activity instances and their pr-value and m-value curves for three different datasets, D_01, D_06 and D_07, presented in parts a, b and c, respectively.The top row indicates the original spatiotemporal instances, with the x-axis denoting the timeline and the y-axis indexing the instances; the middle row provides the pr-value curves for instances in the datasets, with the x-axis indexing the symbols and the y-axis denoting the pr-value; and the bottom row provides the m-value curves, with the x-axis indexing the symbols and the y-axis denoting the m-value.

Figure 7 .
Figure 7.The time performance analysis for the proposed method.(a) The CPU time in finding all non-everpresent symbols for each dataset, with the x-axis indexing the datasets and the y-axis showing the total CPU time.(b) The number of the symbols that have been identified using the binary-tree-based prejudgment and the total symbols in T for each set, with the x-axis indicating the datasets and the y-axis denoting the number of the total symbols in each dataset.

Figure 8 .
Figure 8.An illustration of the found patterns of progressive changes in older adults' sleeping activity, with the x-axis denoting the timeline and the yaxis indexing the instances.(a) GDB pattern.(b) GDE pattern.(c) GAB pattern.(d) GAE pattern.
[39,40]ep data used in this work was chosen from the open activity of daily living (ADL) datasets made available by Washington State University (http://ailab.wsu.edu/casas/datasets.html)[39,40].The datasets were acquired in several testbeds (e.g., Tulum, Kyoto, and Cairo apartments) from 2007 to 2012.The activities contained in the different datasets differ in terms of activity type, activity number, and sample population.The most frequent types of activities in the datasets are Meal_Preparation, Eating, Sleeping, Entering/Leaving_Home, Watch_TV, and Toileting.Different numbers of older adult participants were recruited to live in the apartments (i.e., testbeds) in order to collect these activity data.

Table 1 . Test dataset for the experiment. Number of Progressive s min s max e min e max Dataset Instances Change (hr:min) (hr:min) (hr:min) (hr:min) s ts (h)
denotes the location in which A sleep often occurs; T indicates the beginning time of A sleep , (i.e., the time at which an older adult begins to sleep); and D is the duration of A sleep .It is worth noting that the location L in the triple representation min , s max , e min , and e max are the minimum of the beginning times, maximum of the beginning times, minimum of the ending times, and maximum of the ending times, respectively; s ts denotes the calculated size of timeslot.Definition 3. A timeline is a time interval of Îs min ˚...Èe max ˘, where s min is the minimum (earliest) beginning time and e max is the maximum (latest) ending time as shown in Figure s {S 1 , S 2 , S 3 , S 4 , S 5 , S 6 , S S 7 7 , S 8 , S 9 , S 10 , S 11 , S 12 , S 13 } {S 3 , S 4 , S 5 , S 6 , S 7 , S 8 , S 9 , S 10 } is the everpresent set {S 1 , S 2 , S S 3 3 , S 4 , S 5 , S 6 } T =

Table 2 . The calculated CHG P values for the test dataset in Table 1.
Healthcare Engineering • Vol. 5 • No. 2 • 2014 219