Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Monday, March 11, 2019 at 4:00 PM to 4:30 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Advertisement

Citing this Article

Right click to copy or hit: ctrl+c (cmd+c on mac)

Published on 10.07.19 in Vol 7, No 7 (2019): July

Preprints (earlier versions) of this paper are available at http://preprints.jmir.org/preprint/14090, first published Mar 21, 2019.

This paper is in the following e-collection/theme issue:

    Original Paper

    A Combination of Indoor Localization and Wearable Sensor–Based Physical Activity Recognition to Assess Older Patients Undergoing Subacute Rehabilitation: Baseline Study Results

    1Center for Smart Health, University of California, Los Angeles, Los Angeles, CA, United States

    2Department of Computer Science, University of California, Los Angeles, Los Angeles, CA, United States

    3Department of Hematology and Oncology, University of California, Los Angeles, Los Angeles, CA, United States

    4Department of Medicine Statistics Core, Biostatistics and Computational Biology, University of California, Los Angeles, Los Angeles, CA, United States

    5Department of Biomedical Sciences, California School for Health Sciences, Los Angeles, CA, United States

    6Department of Psychology, University of California, Los Angeles, Los Angeles, CA, United States

    7Rockport Healthcare Services, Los Angeles, CA, United States

    8Division of General Internal Medicine, University of California, Los Angeles, Los Angeles, CA, United States

    Corresponding Author:

    Ramin Ramezani, PhD

    Center for Smart Health

    University of California, Los Angeles

    Los Angeles, CA,

    United States

    Phone: 1 4242997051

    Email:


    ABSTRACT

    Background: Health care, in recent years, has made great leaps in integrating wireless technology into traditional models of care. The availability of ubiquitous devices such as wearable sensors has enabled researchers to collect voluminous datasets and harness them in a wide range of health care topics. One of the goals of using on-body wearable sensors has been to study and analyze human activity and functional patterns, thereby predicting harmful outcomes such as falls. It can also be used to track precise individual movements to form personalized behavioral patterns, to standardize the concept of frailty, well-being/independence, etc. Most wearable devices such as activity trackers and smartwatches are equipped with low-cost embedded sensors that can provide users with health statistics. In addition to wearable devices, Bluetooth low-energy sensors known as BLE beacons have gained traction among researchers in ambient intelligence domain. The low cost and durability of newer versions have made BLE beacons feasible gadgets to yield indoor localization data, an adjunct feature in human activity recognition. In the studies by Moatamed et al and the patent application by Ramezani et al, we introduced a generic framework (Sensing At-Risk Population) that draws on the classification of human movements using a 3-axial accelerometer and extracting indoor localization using BLE beacons, in concert.

    Objective: The study aimed to examine the ability of combination of physical activity and indoor location features, extracted at baseline, on a cohort of 154 rehabilitation-dwelling patients to discriminate between subacute care patients who are re-admitted to the hospital versus the patients who are able to stay in a community setting.

    Methods: We analyzed physical activity sensor features to assess activity time and intensity. We also analyzed activities with regard to indoor localization. Chi-square and Kruskal-Wallis tests were used to compare demographic variables and sensor feature variables in outcome groups. Random forests were used to build predictive models based on the most significant features.

    Results: Standing time percentage (P<.001, d=1.51), laying down time percentage (P<.001, d=1.35), resident room energy intensity (P<.001, d=1.25), resident bed energy intensity (P<.001, d=1.23), and energy percentage of active state (P=.001, d=1.24) are the 5 most statistically significant features in distinguishing outcome groups at baseline. The energy intensity of the resident room (P<.001, d=1.25) was achieved by capturing indoor localization information. Random forests revealed that the energy intensity of the resident room, as a standalone attribute, is the most sensitive parameter in the identification of outcome groups (area under the curve=0.84).

    Conclusions: This study demonstrates that a combination of indoor localization and physical activity tracking produces a series of features at baseline, a subset of which can better distinguish between at-risk patients that can gain independence versus the patients that are rehospitalized.

    JMIR Mhealth Uhealth 2019;7(7):e14090

    doi:10.2196/14090

    KEYWORDS



    Introduction

    Background

    According to the most recent census statistics, by 2050, the population aged 65 years and older is projected to double in size to 83.7 million in the United States [1]. With the increase of this geriatric population, health care utilization will increase dramatically, with a concomitant demand for rehabilitation and in-home care after hospitalization [2]. Finding the best way to support patients during rehabilitation, both at facilities and in home, without compromising patient safety is considered to be a significant challenge. The importance of patient safety and rehabilitation has highlighted the need for constant vigilance and fostered methodologies by which patients can be remotely monitored [2-8].

    Numerous studies have investigated the effectiveness of remote patient health monitoring, some suggesting the potential for such technologies to reduce the overall re-admission cost [9]. With the advent of wearable devices in recent years, remote health monitoring has evolved and drawn attention, mainly by utilizing physical activity trackers. It is widely assumed that a physical activity regimen implies behavioral patterns that can affect health outcomes. Hence, tracking these patterns and leveraging them may allow the prediction of harmful outcomes, such as falls, in a timely manner. Moreover, tracking individuals’ personalized behavioral patterns may allow for the creation of actionable messages to patients and caregivers to improve patient health and outcomes [10]. The purpose of this study was to investigate the physical activity and indoor localization features obtained from our remote patient monitoring system, Sensing At-Risk Population (SARP) [2,11-14]. This study reports on SARP sensor–based markers for rehabilitation screening within a geriatric population, exploring if SARP can be used to prospectively distinguish between at-risk patients in a subacute rehabilitation environment.

    Sensing At-Risk Population System Overview

    Details of the system architecture with proximity-based sensors (beacons) and a Bluetooth-enabled smartwatch as its main components can be found in the study by Moatamed et al [2] and the patent application by Ramezani et al [14]. Building models for physical activity tracking and indoor localization was based on data collected using (1) commercially available Sony SmartWatch 3 with built-in EM7180 ± 2 g triaxial accelerometer, 420 mA battery, and BCM43340 Bluetooth module and (2) proximity beacons (MCU ARM Cortex-M4 32-bit processor with floating-point unit). To build the activity tracking and indoor localization models of SARP system, patients were consented on admission to a subacute care rehabilitation center in Los Angeles.

    Bluetooth Low Energy Beacons and Indoor Localization

    Beacons broadcast their presence to Bluetooth-enabled devices. Utilizing the beacons’ Received Signal Strength Indicator (RSSI) values using smartwatches, the SARP system calculates the proximity of the watch to each beacon, thereby inferring the indoor location of the patient wearing that watch. BLE beacons (bluetooth low-energy sensors) have become popular in gathering contextual awareness because of durability and low cost. When used in health care, however, validating reliability and accuracy of their location information is paramount. Beacons are highly susceptible to diffraction, multipath propagation, angle-of-arrival, lack of line-of-sight, and absorption by the human body. In this project, because locations of interest were within close proximity, we considered RSSI values ranged between −50 dBm to −100 dBm. The average RSSI within the line-of-sight, measured by the watch at 1 feet distance, was −66 dBm. To achieve the best accuracy with respect to locations of interest, shown in Figure 1, considering beacons hardware specification was crucial. Beacon’s antenna configuration and the proximity of locations heavily influence the accuracy of indoor localization. Hence, to achieve a high indoor localization accuracy, it was essential to refine beacon placements iteratively. Moreover, in the rehabilitation facility shown in Figure 1, we empirically learned to set the transmission power to −12 dBm and the transmission interval to 250 ms. In studies by Bouchard et al [11-13], we proposed a few methods and considerations that can help enhance the indoor localization accuracies. A summary of the ground truth testing executed at the rehabilitation facility shown in Figure 1, with an overall accuracy >80%, can be found in a study by Moatamed et al [2].

    Figure 1. Subacute rehabilitation facility map: resident room on top and therapy room at the bottom with locations of mounted beacons shown in red.
    View this figure

    Accelerometer Data Processing and Physical Activity Parameters

    To infer physical activity of patients in this study, 3-axis raw acceleration signal sampled at 16 Hz was extracted, and the signal magnitude (SM) was initially calculated according to Figure 2, equation 1, where acc indicates acceleration force around each axis in g units including gravity (1 g=9.81 m/s2). The range of the acquired signal is ± 2g. Batches of 160 samples (window size of 10 seconds) were fed to a fifth order Butterworth band-pass filter with cut-off frequencies of 0.5 and 8 Hz. The filtering limited the signal to highlight the frequencies that are most representative of human motion while eliminating the direct current component. Various window sizes ranging from 4 to 12.8 seconds with different overlapping implementations have been used in different studies [15]. These characteristics are normally chosen empirically based on feature extraction, activity labeling, and other annotation factors. In this study, a window size of 10 seconds was used with a 1-second overlap [2]. After preprocessing the accelerometer data, the next step was to infer human activity (positioning) and to later translate the positioning into a quantifiable metric. However, quantifying the physical activity can be deemed challenging and will be discussed after a brief description of physical activity classification.

    A decade has passed since the advent of commercially available low-cost, light-weight accelerometers. The enthusiasm about their potential in extracting physical patterns to usually, but not exclusively, improve health outcomes has led researchers to master the techniques of activity recognition [15,16]. Some researchers have even tried to infer activity intensities and predict energy consumption by comparing accelerometer patterns with measured metabolic equivalents [17-19]. Despite significant and impressive outcomes, the triumph is mostly based on analyzing small cohorts, or often a homogeneous group of people, with similar age or health conditions. Training and testing datasets in most studies are normally collated from people following a certain protocol, whereas in real life, human movements are intertwined, that is, the sequence of movements does not always form a same pattern. As such, the performance of various activity recognition algorithms/approaches applied to real-world scenarios should be taken with a grain of salt [15,16,18-20]. The following factors are influential in any human activity tracking algorithm: (1) diversity of human movement habits; (2) variety of human disabilities needing different assistive devices, yielding distinct movement patterns; (3) deficiencies of machine learning algorithms in building one-size-fits-all model; and (4) limitations to distinguish particular motions due to accelerometer placement, for instance, classifying sitting still and laying down with sensor on wrist versus waist [15,20]. To reduce the negative effect of the mentioned factors, this study uses a combination of classifications in 3 steps according to algorithm shown in Figure 3. Time and frequency domain characteristics of the signal (main, median, variance, skewness, kurtosis, peak frequency, and peak power) were used as features. SARP initially categorizes activities broadly into walking and stationary.

    Figure 2. Equations. MAD: mean absolute deviation.
    View this figure
    Figure 3. Hierarchical Activity Recognition Pseudo Code.
    View this figure

    Walking embodies active status, and when stationary, the classifier separates brisk (active) and idle (nonactive) movements and later classifies postures into sedentary, standing, and laying down. Both Tables 1 and 2 depict the summary of physical activity (positioning) classifiers’ 10-fold cross-validation results built on 50 patients over approximately 22 hours of collated data at subacute care rehabilitation center in Los Angeles. The algorithms were later validated and refined over the course of 6 months of ground truth testing at the same skilled nursing facility.

    Step Counts Versus Raw Accelerometer Assessment

    The next stage was to find a way to quantify the difference between different activity status. Step counting is a common way that has long been used to quantify the ambulatory physical activity. However, similar to activity recognition approaches explained earlier, the accuracy of step counters is often the subject of debate among researchers. Comprehensive studies with contradictory results on the accuracy of pedometers and wearable accelerometers can be found in the studies by Crouter et al [21], Mammen et al [22], and Case et al [23]. What is rather clear in using step counters/pedometers is their efficacy in quantifying ambulatory activities and not stationary. For step counters to be more accurate, a user is required to satisfy a minimum walking speed that is often mentioned in the literature as 67 m/min or even higher [24-26]. Therefore, step counters are less likely to produce accurate assessment for less mobile geriatric population. Besides, they are deemed even less effective in quantifying activities in stationary positions. Most studies assess the accuracy of step counters by asking users to walk on a treadmill, which neglects scenarios in which users are stationary, yet pedometers accumulate step counts because of movements in hand. To account for any movements (stationary and ambulatory), this study calculates mean absolute deviation (MAD) of accelerometer magnitude signal using equation 2, Figure 2. MAD calculates the statistical dispersion of acceleration from the mean and its unit is meter per second squared,

    where xi is the SM in each 10-second window, and the xave is the average of accelerometer magnitude for 160 samples (10-second epoch×16 Hz). MAD of accelerometer magnitude represents the average magnitude of acceleration within an interval (in this case, 10 seconds) and is proportionate to force applied to the watch by patient since f=ma. This value multiplied into displacement will produce relative work and energy. Take into account that calculating displacement from acceleration, however, is not very accurate because it is the result of accelerometer’s double integration, that is, any acceleration jitter accumulates and yields big drifts in displacement. Calculating force, however, is accurate and proportionate to energy; hence, the term energy has been used in this study to quantify human activity movements.

    Another way of quantifying activity is to integrate each acceleration channel to produce kinetic energy using e=1/2m.v2. This way, however, requires more calculations compared with MAD; for the actual speed, each channel should be considered separately so that the direction of acceleration and deceleration that are removed in SM will be taken into account.

    It is worth highlighting that by using a smartwatch accelerometer, it is only possible to calculate the force, proportionate to energy, that is spent on the watch. Hence, if a patient is carrying a weight on the watch-worn hand, the energy expenditure of the patient will not change with regard to the watch.

    Active/nonactive is determined in this study using an empirical threshold of 0.02 m/s2 (2 cm/s2) over the MAD value. As explained earlier, calculating displacement from the accelerometer is not highly reliable. However, for illustrative purposes, assume the initial speed of hand movement in each window of 10 seconds is zero. Using equation 3 shown in Figure 2, the value 0.02 indicates that a patient’s hand displacement has been 1 m in 10 seconds. In case of equal or greater shifts, the patient is considered active, otherwise, idle (nonactive).

    Figure 4 shows 10-second examples of acceleration SM of a person. It illustrates the difference in walking, active and nonactive stationary positions.

    Table 1. Online watch classifier.
    View this table
    Table 2. Activity recognition: positioning.
    View this table
    Figure 4. Magnitude of accelerometer signal after filtering (direct current component removed before filtering).
    View this figure

    Methods

    Overview

    From June 2016 to November 2017, we recruited patients after admission to a subacute rehabilitation center in Los Angeles. We performed a cross-sectional baseline study of this cohort to better understand data features collected by the SARP system. We investigated the prevalence of physical activity tracking features and indoor localization features at baseline for both outcome groups (hospital vs long-term care). Moreover, we assessed their efficacy in determining the outcome (hospital vs long-term care).

    Participants

    Participants aged older than 60 years were recruited from a subacute rehabilitation facility in Los Angeles. The study cohort contains patients who had been admitted to a subacute rehabilitation center for 21 days. After this period, patients were either re-admitted to hospital (H) or stayed in community (C; either at home or long-term care). The inclusion criteria were broad, allowing any patient to participate as long as they were aged older than 60 years, English speaking, and able to consent with the exclusion criteria including movement disorders or paralysis of the upper or lower extremity. The diversity of cohort included patients who were a postsurgical, poststroke, and postclinical decompensation because of medical illnesses. Eligible participants signed a consent form approved by the University of California, Los Angeles, Institutional Review Board.

    Study Design

    Patients were given a smartwatch by a clinical coordinator every morning at 9 am. Patients were asked to wear their watches at all times until the coordinator collected the watch at around 6 pm every day. Watch batteries were expected to last longer than the protocol period (>9 hours). Patients normally stayed in the resident room (bedroom) and were scheduled for an hour of daily exercise and activity in the therapy room. Beacons were mounted at locations of interest (Table 3), shown with color dots in Figure 1 within bedroom and therapy room. Take into account that despite imposing an identical protocol for all patients, daily collected data from each individual may differ. This is primarily because of patients not complying with the protocol at all times, losing interest during the day, feeling uncomfortable, and getting concerned about their privacy. Therefore, to provide a situation in which a fair comparison among patients can be enforced, we determined analysis inclusion criteria.

    Table 3. Locations of interest. For sensor-based feature assessment throughout the paper, shower, toilet, and sink are considered as bathroom; walls 1, 2, and 3 as wall; beds 1 to 4 inside the therapy room and beds 1 and 2 inside the resident room as beds.
    View this table

    Analysis Inclusion Criteria

    For this baseline analysis, we included study participants who satisfied the following constraints: (1) patients with 4 hours or more of watch wear time data in at least 1 day within the first 3 days of admission (defined as baseline); and (2) having 15 min or more of therapy room wear time in that particular baseline day. In case both inclusion criteria were satisfied on more than 1 day, the earliest day was selected as baseline. The reason for choosing 4 hours or more wear time was to set a standard minimum; given the health of this population whom mostly recently discharged from the hospital, we anticipated variability in watch usage. To have a minimum standard, we agreed that patients needed to wear the watch more than 50% of the available hours per day (in this study, 8 hours).

    The hours when the watch was not worn were excluded from the study; therefore, baseline hours may not be consecutive.

    Measures

    Demographic and Clinical Characteristics

    We collected the demographic characteristics of patients such as age, race, gender, and ethnicity. We also translated the clinical coordinator’s assessments including usage of assistive devices and their type, measures of activity of daily living (ADL), pain (yes/no), and number of active diagnosis (more or less than 10). We investigated the significance of such characteristics in distinguishing the outcome (community vs hospital).

    Sensor-Based Parameters

    Sensor-based features are combination of 3 groups of parameters that are achieved by harnessing smartwatch and BLE beacons. The features are based on (1) activity recognition such as sitting time and standing time; (2) indoor localization, for example, time in bed, time in bathroom, or therapy room; and (3) row acceleration quantification, MAD (energy; see section Sensing At-Risk Population System Overview). By combining these attributes, we achieved features such as sitting time in bed or energy spent in walking or in bed.

    To perform a fair comparison among patients with different watch wear time, we normalized features: time spent (minutes) in a certain physical activity or location was divided by uptime (the total watch wear time in a day in minutes) to yield normalized time features. Uptime is an essential factor in providing fair comparison

    We investigated the significance of sensor-based features with respect to the outcomes: hospital versus community. All measurements are at baseline, that is, the day that satisfies inclusion criteria from 9 am to 6 pm. We calculated “time spent in percentage,” “energy intensity (E),” and “energy spent in percentages,” as shown in equations 4, 5, and 6 in Figure 2.

    To recap, for each individual, time-related features such as sitting time were divided by uptime. Energy-related features such as walking were divided by: (1) the uptime, yielding energy intensity and (2) their total daily value, producing the energy percentage.

    Statistical Analysis

    We explored the capability of baseline sensor-based and demographic features to distinguish between subacute rehabilitation patients based on their outcomes (ie, re-admitted to hospital (H) vs staying in the community (C) either long-term care or home). Chi-squared tests were used to compare categorical demographic variables between outcome groups. We compared quantitative demographic variables and sensor-based metrics (physical activity derived from watch accelerometer and indoor localization inferred from BLE beacons RSSI) between groups using the Kruskal-Wallis test. Cohen d was used to summarize the effect size and illustrate the discriminatory power of each feature. Commonly, 0.2, 0.5, and 0.8 are Cohen d cut-off values indicating small, medium, and large effect size, respectively. Spearman rho was used to measure correlations between physical activity and location-based features.

    Predictive Models of Outcome

    We investigated the capability of features at baseline to triage and predict patients who were re-admitted to the hospital or who stayed in community. We built random forest models (maximum depth=2, random state=40, and class_weight=balanced), with hospital patients as positive group. We used single or combination of features with highest statistical significance in distinguishing outcomes according to Kruskal-Wallis tests. Model generation and evaluating performance characteristics (3-fold cross-validation) including sensitivity, specificity, accuracy, and area under the curve (AUC) estimation were performed using Python Programming Language libraries Pandas (version 0.21.0) and Numpy (version 1.14.5), Scipy (version 1.0.0), and Scikit-learn (version 0.19.1) [27-30].


    Results

    Demographic and Clinical Characteristics

    From 184 consented subjects, 30 were excluded because of not satisfying the analysis inclusion criteria. A total of 154 patients were included in this study in which 145 (94.2%) of subjects discharged home/community (C), and 9 (5.8%) re-admitted to hospital (H) at the end of their rehabilitation process. Table 4 presents detailed sociodemographic and clinical characteristics of this cohort, such as age, gender, race-ethnicity, presence of pain, number of active diagnoses, usage of assistive devices, and ADL. Table 4 indicates the mean (SD) and number of patients included for every particular parameter. Among the clinical assessments, Table 4 shows that ADL Toilet is significant in determining the outcome (P=.007) with 65% of the cohort in need of extensive assistance and 35% limited assistance.

    Table 4. Sociodemographic and clinical characteristics of the cohort of 154 patients.
    View this table

    Energy Intensity Features Assessment

    Amongst sensory-based features shown in Figure 2, equations (4-6), energy intensity features are the ratio of the total energy spent in a particular activity or location to their corresponding time spent. Taking into account, indoor localization capability of SARP system enabled us to calculate the energy spent at each location of interest, sum of which was broadly categorized into (1) energy intensity in resident room and (2) energy intensity in therapy room. According to Table 5, energy features that best discriminated community and hospital patients were energy intensity in resident room (P<.001, d=1.21), resident_bed (P<.001, d=1.23), resident_bath (P=.004, d=1.18), and total energy intensity (P=.003, d=0.87). Features such as energy intensity of laying down (P=.02), and therapy_bathroom (P=.02), despite statistical significance, have low effect sizes (d=0.418 and d=0.17, respectively). Moreover, with P<.001 and d=1.25, energy intensity in resident room has high discriminatory power with respect to outcome.

    Table 5. Sensor-based (activity and indoor localization) features: assessment according to outcomes.
    View this table

    Figure 5 depicts the energy intensity distributions between 2 groups in resident and therapy rooms. It shows that energy intensity in therapy room in both groups has similar mean value (line within the box); therefore, a clear distinction cannot be made within 2 groups based on that feature. However, the mean value of community group in resident room is clearly higher than in hospital patients.

    Kernel density estimation (KDE) distributions are shown in Figure 6 (subplots A and D). The figure attests to the distinction of energy intensity in resident room among community and hospital patients (subplot A). However, the KDE of energy intensity in therapy room (subplot D) does not indicate the same discriminatory power. Figure 6 (subplot B) indicates that energy intensity of most patients in therapy room is higher compared with resident room for both outcome groups because most patients fall below the identity line. Points shown on the identity line represent patients with same therapy and resident intensities. According to subplot (C), the center core of the contour plot (representing most patients) in community group is almost circular contrary to hospital patients. This indicates that the ratio of resident to therapy intensity is closer to one (ie, same activity intensities). On the contrary, more oval shape of the contour core in hospital group can imply that most patients are persistently more active during therapy sessions while being less active in their resident room. The increase in energy levels can be seen clearly in Figure 7. The figure depicts the ratio of energy intensity in therapy room to resident room. Most patients in hospital outcome group, demarcated by red line, fall around number 2. In other words, therapy room energy intensity is twice the resident room for most patients in hospital group. However, 50 patients in community group (blue histogram) have the ratio close to 1, that is, the same intensity in both therapy and resident room. A more detailed scenario of both groups within the therapy room can be found in Figure 8 and Table 6.

    Figure 5. Energy intensity distribution.
    View this figure
    Figure 6. Gauging energy intensity in community versus hospital.
    View this figure
    Figure 7. Distribution of patients spending energy in therapy room compared with resident room. X-axis indicates the ratio of energy in therapy to resident room.
    View this figure
    Figure 8. Time and energy intensity details of therapy room.
    View this figure

    Average time spent and energy intensity at each therapy location stratified by groups are shown in Figure 8. It is clear that hospital group spent no time at stairs, scifit, table, and endorphine. The 5 most intensive activities were small table, stairs, scifit, table, and bike. Small table and table are places where patient normally carried out hand pedaling exercises. Table 6 further highlights the details of therapy room location/facility usage in each group. More than 70% of participants from both groups had used bed and bathroom in therapy room, with bathroom ’s P<.05 (Table 5). However, it is worth mentioning that the effect size of bathroom energy intensity is small: 0.17 (cut-off regions: 0.2 small, 0.5 medium, and 0.8 large). Furthermore, Figure 8 reveals that both groups’ intensities at bed and bathroom were less than 60 per min. In a study by Razjouyan et al [8], a cutoff point of 90 is suggested to differentiate between light and moderate-to-vigorous activities.

    Table 6. Frequency of therapy room location/facility usage by group.
    View this table

    Figure 9 illustrates Spearman correlations among features. According to annotations explained in the Features section, E indicates energy intensity, E% denotes energy percentage, and T% shows the percentage of time spent. Circles, contrary to ovals, correspond to low correlation, whereas lines imply the highest correlation. Darker spectrum on either side (red or blue) represents higher correlation; red implies positive, whereas blue is indicative of negative correlation. It is clear from the figure that laying down is negatively correlated with the rest of the features. Bath and bed in resident room are understandably correlated strongly with energy spent in resident room because almost all activities happened in those 2 locations, and patients hardly used the chair. Bed, bath, resband, small table, bike, and scifit are strongly correlated with energy spent in therapy room. It is clear that being active is highly correlated with overall energy intensity. Resident room energy intensity is strongly correlated with overall energy intensity.

    Energy Percentage Features Assessment

    Energy percentage feature, as mentioned in Figure 2, is the percentage of energy spent in walking, sitting, standing, laying, or energy spent in locations of interest divided by total energy spent in that day. According to Table 5, community patients are more active (P=.001, d=1.24) than patients re-admitted to the hospital. Meanwhile, energy percentage of standing (P=.002, d=1.24) and sitting (P=.02, d=0.86) of the community group is higher than those in hospital group. Other than walking, all energy percentage parameters were shown significant in distinguishing between both groups. Walking is not significant in distinguishing the outcome: Energy (%) in walking (P=.08, d=0.50) and energy intensity during walking (P=.44, d=0.34).

    Time Features Assessment

    According to Table 5, standing time (%) has the strongest discriminatory power (P<.001, d=1.51) among all watch-derived parameters. Community group has higher time percentage in laying down (P<.001, d=1.35) and active state (P=.001, d=1.24) compared with hospital group. Despite statistical significance of sitting time (%), its effect size is between small and medium (P=.04, d=0.31). Walking time was quite negligible (<1% of time for both groups with P=.09, d=0.44), whereas overall active state, which captures walking and stationary active periods, was highly significant (P=.001, d=1.10). As shown in the table, none of the time (%) parameters in resident room have the ability to discriminate between the 2 outcome groups.

    Performance of Predictive Models at Baseline

    Random forest models were built based on the most statistically significant features. In reviewing Table 4, the top 3 most influential features in distinguishing the outcomes were % standing time (P<.001, d=1.51), % laying down time (P<.001, d=1.35), and resident room energy intensity (P<.001, d=1.25). Results of 3-fold cross-validation models with their corresponding AUC score are presented in Table 7. Take into account that the sensitivity (recall) presented in the table is not the weighted average and reflects only recall of minority (H) group. Specificity indicates the true negative rate when negative group is comprised most patients returning to community setting (C) after the rehabilitation period.

    Figure 9. Correlations among sensor-based features. Asterisk indicates parameters with P<.05.
    View this figure
    Table 7. Predictive models: 3-fold cross-validation (community, n=48; hospital, n=3).
    View this table

    Discussion

    To our knowledge, this is the first study that has combined indoor localization and accelerometer-based physical activity recognition to assess older patients. A subset of indoor location and physical activity features were found to be highly correlated with the outcomes (community vs hospital re-admission) at baseline. In this section, we discuss the significant highlights of the result.

    Steps Versus Raw Acceleration Signal

    Interestingly, walking, a known distinctive parameter in assessing physical functional performance in certain older populations [8], did not yield significance in this study. In populations that are frail, similar to that in subacute rehabilitation, only a negligible amount of time is spent walking (<1% of daily activity). This suggests that in these populations, steps counters may not necessarily be the best way to quantify active state [24,25]. It would be best to prepare for the stark reality that geriatric population may not be active enough to assess their well-being or infer their independence only based on step counts or by monitoring their walking. A combination of activity features that includes both wearable sensor and stationary beacons that provide corresponding indoor localizations could be a stronger indicator of their general well-being and/or frailty. Moreover, the use of raw acceleration signals to quantify energy intensity allows us to capture even small movements, the movements that may not trigger step counters but still indicate some level of activity. Let us consider an example in which we considered energy spent rather than steps: compared with community, hospital patients show higher percentage of energy while laying down (P=.39, d=0.54). They also spent more overall time (%) in that position (60.99) compared with 46.83 for community patients. However, energy intensity of community patients is higher than hospital patients (26.23 vs 19.54). This indicates that community patients have been more active while lying down. Being more active while lying down may be the result of turning in bed; hence, this feature may denote higher ability to move in community patients. In this scenario, as discussed earlier, step counters will not produce reliable results to quantify patients’ activity levels.

    Activity With Therapist Versus Resident Time Alone

    One interesting aspect of this study was to investigate the activity while a patient is with a physical therapist versus activity during the other hours of the day. It did not appear that a clear distinction could be made between different outcome groups based on therapy room energy intensity. This could be because all patients during therapy sessions are engaged by the therapist in similar physical activities following set protocols. However, the energy intensity of resident room was distinctive within outcome groups.

    Value of Indoor Localization Data

    To assess the value of indoor localization in activity tracking, it would be best to highlight some of the scenarios: according to Table 4, among clinical characteristic assessment, ADL toilet (P=.007) was the most significant feature in determining the outcome. This feature corresponds to the watch-derived feature energy intensity in resident bathroom. With P=.004 and effect size of d=1.18, energy intensity in resident room (achieved from indoor localization) hence confirms the clinical finding and can be considered in the absence of ADL evaluations. In other words, ADL variant, a highly significant clinical feature, can be replicated using combination of indoor localization and activity/energy derivations.

    Both group energy intensities at bed and bath were less than 60 per min. In the study by Razjouyan et al [8], authors use a cutoff point of 90 to differentiate between light and moderate-to-vigorous activities. On the basis of that, given the intensity in both bathroom and bed for either of the groups, we can conclude that patients performed light activities in those locations.

    None of the patients in hospital outcome group used therapy room toilet/bathroom. It is likely that those patients were not capable enough to perform such exercises or even not advised by clinicians/nurses to do so to prevent injury. Either way, the lack of performing an activity, in this case, information extracted from indoor localization data, could be an early indication of which group a patient belongs to; it could also potentially be used to identify adverse outcomes and proactively address to prevent a negative outcome.

    Predictive Analysis: Statistically Significant Features

    P value as statistical significance or strength of evidence index has long been a subject of debate [31,32]. It is very crucial to know that the P value is not a definite test; increasing more attributes significantly correlated with the outcome variable in a predictive model does not necessarily yield higher predictability. Although statistical significance index and its effect size provide a standard exploratory data analysis and perhaps a good informal heuristic for choosing attributes of a prediction model, machine learning practice has more freedom from model assumptions. This study shows that the addition of significant variants did not increase predictive power and the model with only energy intensity in resident room produced the highest recall of minority class (hospital outcome) and overall AUC (0.84).

    Considering only the prediction results, we can infer that location data add value to our system. It is apparent that energy intensity in resident room is the most decisive feature in predicting the outcome.

    Limitations and Future Research

    Activity classification can best be obtained using a series of motion sensors placed on various parts of the body. Thus, a wide range of activities can be captured as most body motions are detected. However, to simplify the activity detection, using single motion sensors is quite popular. Placing an accelerometer on the hip has been one of the most popular methods because it captures almost all human motions; however, it underestimates the arm ergometry, as it cannot fully extract the arm movements [33]. Wrist-worn accelerometers are popular because of their ease of use, water resistance in most brands, and capturing a comprehensive set of activities. However, interpreting their data for certain sedentary activities such as sitting, standing, and laying is rather challenging, in that, hand movements are very similar in those scenarios. Although ambulation detection is evident in most cases, error rates of classification increase when using assistive devices, walking in very low speed, carrying a weight with the hand that is not wearing the watch, or doing activities involving hand and feet movement together such as sweeping [15,33,34].

    Patients’ compliance with wearing a smartwatch was the main challenge of this study, and we expect it to be a generic obstacle in similar studies that aim to harness wearable technology for patients. Moreover, if the target population is less familiar with new forms of technology such as wearable devices, the compliance issue might become even more crucial. In this study, we recruited 184 patients, of which 30 patients were excluded for not satisfying the analysis inclusion criteria (watch wear time constraint). Our baseline analyses revealed that 50% of patients removed their watches before the study coordinator collects them at the end of the 8 hours.

    Dealing with medical datasets is rather challenging in that the datasets predominantly consist of normal cases in addition to minority abnormal instances that deem to be more interesting [35]. Many attempts have been made to overcome the obstacle of the normal and abnormal samples known as imbalanced datasets. There exist approaches to improve the performance of predictive models by oversampling and/or undersampling the dominant and abnormal instances [36-38]. In our study cohort, the 2 outcome categories are not equally represented, making the dataset imbalanced. In the future, we aim to further investigate the use of oversampling and undersampling of our dataset as methods that perhaps are not very conventional in the medical field but can possibly improve the predictability of our models.

    Next step would be the longitudinal analysis on the same study cohort over the 21-day period they were admitted to the same rehabilitation center. This will allow us to track the trends in sensor feature values and investigate if their changes mimic the daily assessment change performed by clinicians. The result can allow development of models of early frailty detection or producing intervention alerts.

    Conclusions

    Despite the evolution of eHealth and mobile health (mHealth) and the emerging role of wearable and mobile technology in new platforms of health care, there are anecdotal claims that wearable technology may not precisely quantify patients’ health [39]. In this study, we showed that wearable technology, equipped with refined physical activity tracking algorithms, in our case, tailored for geriatrics, can result in a better understanding of patients and hopefully pave the way in developing intervention alerts and approaches. We discussed how SARP features provide a clearer storyline of daily activity patterns by merging indoor localization with physical activities. The SARP system can be incorporated into mHealth technology platforms and can provide a more objective assessment of the frail population.

    Acknowledgments

    The authors would like to express their gratitude to the researchers cited here and apologize to those whose work, because of page restrictions, could not be mentioned. This research was mainly funded by an National Institutes of Health (NIH) grant, DHHS Agency for Health Care Research and Quality: RO1 HS024394.

    Conflicts of Interest

    The SARP system is protected by a patent (US Patent Application 15/736,744) [14] owned by the University of California, Los Angeles, in which RR, AN, and MS are listed as co-inventors. RR and AN are co-founders of InvistaHealth LLC. Other authors have declared no potential conflict of interest with regard to the publication of this paper.

    References

    1. Ortman JA, Velkoff VA, Hogan H. Census.gov. 2014. An Aging Nation: The Older Population in the United States   URL: https://www.census.gov/prod/2014pubs/p25-1140.pdf
    2. Moatamed B, Arjun, Shahmohammadi F, Ramezani R, Naeim A, Sarrafzadeh M. Low-Cost Indoor Health Monitoring System. In: 13th International Conference on Wearable and Implantable Body Sensor Networks (BSN). 2016 Presented at: IEEE'16; June 14-17, 2016; San Francisco, CA p. 159-164. [CrossRef]
    3. Brown SJ. FPO IP Research & Communities. 2010. Remote health monitoring and maintenance system   URL: http://www.freepatentsonline.com/7853455.html
    4. Suh M, Chen CA, Woodbridge J, Tu MK, Kim JI, Nahapetian A, et al. A remote patient monitoring system for congestive heart failure. J Med Syst 2011;35(5):1165-1179 [FREE Full text] [CrossRef] [Medline]
    5. Schwenk M, Mohler J, Wendel C, D'Huyvetter K, Fain M, Taylor-Piliae R, et al. Wearable sensor-based in-home assessment of gait, balance, and physical activity for discrimination of frailty status: baseline results of the Arizona frailty cohort study. Gerontology 2015;61(3):258-267 [FREE Full text] [CrossRef] [Medline]
    6. Toosizadeh N, Najafi B, Reiman EM, Mager RM, Veldhuizen JK, O'Connor K, et al. Upper-extremity dual-task function: an innovative method to assess cognitive impairment in older adults. Front Aging Neurosci 2016;8:167 [FREE Full text] [CrossRef] [Medline]
    7. Najafi B, Aminian K, Paraschiv-Ionescu A, Loew F, Büla CJ, Robert P. Ambulatory system for human motion analysis using a kinematic sensor: monitoring of daily physical activity in the elderly. IEEE Trans Biomed Eng 2003;50(6):711-723. [CrossRef] [Medline]
    8. Razjouyan J, Naik A, Horstman M, Kunik M, Amirmazaheri M, Zhou H, et al. Wearable sensors and the assessment of frailty among vulnerable older adults: an observational cohort study. Sensors (Basel) 2018 Apr 26;18(5):pii: E1336 [FREE Full text] [CrossRef] [Medline]
    9. Ong MK, Romano PS, Edgington S, Aronow HU, Auerbach AD, Black JT, Better Effectiveness After Transition–Heart Failure (BEAT-HF) Research Group. Effectiveness of remote patient monitoring after discharge of hospitalized patients with heart failure: the better effectiveness after transition--heart failure (BEAT-HF) randomized clinical trial. JAMA Intern Med 2016 Mar;176(3):310-318 [FREE Full text] [CrossRef] [Medline]
    10. Michie S, van Stralen MM, West R. The behaviour change wheel: a new method for characterising and designing behaviour change interventions. Implement Sci 2011 Apr 23;6:42 [FREE Full text] [CrossRef] [Medline]
    11. Bouchard K, Ramezani R, Naeim A. Features Based Proximity Localization With Bluetooth Emitters. In: 7th Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON). 2016 Presented at: IEEE'16; October 20-22, 2016; New York, USA p. 1-5. [CrossRef]
    12. Bouchard K, Eusufzai MR, Ramezani R, Naeim A. Generalizable Spatial Feature for Human Positioning Based on Bluetooth Beacons. In: 7th Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON). 2016 Presented at: IEEE'16; October 20-22, 2016; New York, USA p. 1-5. [CrossRef]
    13. Bouchard K, Ramezani R, Arjun, Naeim A. Evaluation of Bluetooth Beacons Behavior. In: 7th Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON). 2016 Presented at: IEEE'16; October 20-22, 2016; New York, USA p. 1-3. [CrossRef]
    14. Ramezani R, Naeim A, Moatamed B, Arjun A, Sarrafzadeh M. Google Patents. 2018. Subject assessment using localization, activity recognition and a smart questionnaire   URL: https://patents.google.com/patent/WO2016205212A1/en
    15. Mannini A, Intille SS, Rosenberger M, Sabatini AM, Haskell W. Activity recognition using a single accelerometer placed at the wrist or ankle. Med Sci Sports Exerc 2013 Nov;45(11):2193-2203 [FREE Full text] [CrossRef] [Medline]
    16. Bao L, Intille SS. Activity Recognition From User-Annotated Acceleration Data. In: Second International Conference on Pervasive Computing.: Springer; 2004 Presented at: PERVASIVE'04; April 21-23, 2004; Vienna, Austria p. 1-17.
    17. Bhattacharya A, McCutcheon EP, Shvartz E, Greenleaf JE. Body acceleration distribution and O2 uptake in humans during running and jumping. J Appl Physiol Respir Environ Exerc Physiol 1980 Nov;49(5):881-887. [CrossRef] [Medline]
    18. Treuth MS, Schmitz K, Catellier DJ, McMurray RG, Murray DM, Almeida MJ, et al. Defining accelerometer thresholds for activity intensities in adolescent girls. Med Sci Sports Exerc 2004 Jul;36(7):1259-1266 [FREE Full text] [CrossRef] [Medline]
    19. Staudenmayer J, Pober D, Crouter SE, Bassett DR, Freedson P. An artificial neural network to estimate physical activity energy expenditure and identify physical activity type from an accelerometer. J Appl Physiol (1985) 2009 Oct;107(4):1300-1307 [FREE Full text] [CrossRef] [Medline]
    20. Tapia EM, Intille SS, Larson K. Activity Recognition in the Home Using Simple and Ubiquitous Sensors. In: Second International Conference on Pervasive Computing.: Springer; 2004 Presented at: PERVASIVE'04; April 21-23, 2004; Vienna, Austria p. 158-175.
    21. Crouter SE, Schneider PL, Karabulut M, Bassett Jr DR. Validity of 10 electronic pedometers for measuring steps, distance, and energy cost. Med Sci Sports Exerc 2003 Aug;35(8):1455-1460. [CrossRef] [Medline]
    22. Mammen G, Gardiner S, Senthinathan A, McClemont L, Stone M, Faulkner G. Is this bit fit? Measuring the quality of the FitBit step-counter. Health Fit J Can 2012;5(4):30-39. [CrossRef]
    23. Case MA, Burwick HA, Volpp KG, Patel MS. Accuracy of smartphone applications and wearable devices for tracking physical activity data. J Am Med Assoc 2015 Feb 10;313(6):625-626. [CrossRef] [Medline]
    24. Feito Y, Bassett DR, Thompson DL. Evaluation of activity monitors in controlled and free-living environments. Med Sci Sports Exerc 2012 Apr;44(4):733-741. [CrossRef] [Medline]
    25. Bassett DR, Toth LP, LaMunion SR, Crouter SE. Step counting: a review of measurement considerations and health-related applications. Sports Med 2017 Jul;47(7):1303-1315 [FREE Full text] [CrossRef] [Medline]
    26. Vähä-Ypyä H, Vasankari T, Husu P, Suni J, Sievänen H. A universal, accurate intensity-based classification of different physical activities using raw data of accelerometer. Clin Physiol Funct Imaging 2015;35(1):64-70. [CrossRef] [Medline]
    27. van Rossum G. USENIX | The Advanced Computing Systems Association. Python Programming Language   URL: https:/​/www.​usenix.org/​conference/​2007-usenix-annual-technical-conference/​presentation/​python-programming-language
    28. McKinney W. Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython. Sebastopol, California: O'Reilly Media; 2012.
    29. Millman KJ, Aivazis M. Python for scientists and engineers. Comput Sci Eng 2011 Mar;13(2):9-12. [CrossRef]
    30. Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, et al. Scikit-learn: Machine Learning in Python. J Mach Learn Res 2011:2825-2830 [FREE Full text]
    31. Nuzzo R. Scientific method: statistical errors. Nature 2014 Feb 13;506(7487):150-152. [CrossRef] [Medline]
    32. Lo A, Chernoff H, Zheng T, Lo SH. Why significant variables aren't automatically good predictors. Proc Natl Acad Sci U S A 2015 Nov 10;112(45):13892-13897 [FREE Full text] [CrossRef] [Medline]
    33. Rosenberger ME, Haskell WL, Albinali F, Mota S, Nawyn J, Intille S. Estimating activity and sedentary behavior from an accelerometer on the hip or wrist. Med Sci Sports Exerc 2013 May;45(5):964-975 [FREE Full text] [CrossRef] [Medline]
    34. Godfrey A, Conway R, Meagher D, ÓLaighin G. Direct measurement of human movement by accelerometry. Med Eng Phys 2008;30(10):1364-1386. [CrossRef] [Medline]
    35. Li DC, Liu CW, Hu SC. A learning method for the class imbalance problem with medical data sets. Comput Biol Med 2010 May;40(5):509-518. [CrossRef] [Medline]
    36. Chawla NV, Bowyer KW, Hall LO, Kegelmeyer WP. SMOTE: synthetic minority over-sampling technique. J Artif Intell Res 2002 Jun 1;16:321-357. [CrossRef]
    37. He H, Garcia EA. Learning from imbalanced data. IEEE Trans Knowl Data Eng 2009 Sep;21(9):1263-1284. [CrossRef]
    38. He H, Bai Y, Garcia EA, Li S. ADASYN: Adaptive Synthetic Sampling Approach for Imbalanced Learning. In: International Joint Conference on Neural Networks (IEEE World Congress on Computational Intelligence). ADASYN; 2008 Presented at: IEEE'08; June 1-8, 2008; Hong Kong, China p. 1322-1328.
    39. Nasi G, Cucciniello M, Guerrazzi C. The role of mobile technologies in health care processes: the case of cancer supportive care. J Med Internet Res 2015 Feb 12;17(2):e26 [FREE Full text] [CrossRef] [Medline]


    Abbreviations

    ADL: activity of daily living
    AUC: area under the curve
    BLE beacon: bluetooth low-energy sensors
    C: community
    H: hospital
    KDE: kernel density estimation
    MAD: mean absolute deviation
    mHealth: mobile health
    RSSI: Received Signal Strength Indicator
    SARP: Sensing At-Risk Population
    SM: signal magnitude


    Edited by G Eysenbach; submitted 21.03.19; peer-reviewed by K Votis, P Rametta; comments to author 17.04.19; revised version received 26.04.19; accepted 27.04.19; published 10.07.19

    ©Ramin Ramezani, Wenhao Zhang, Zhuoer Xie, John Shen, David Elashoff, Pamela Roberts, Annette Stanton, Michelle Eslami, Neil Wenger, Majid Sarrafzadeh, Arash Naeim. Originally published in JMIR Mhealth and Uhealth (http://mhealth.jmir.org), 10.07.2019.

    This is an open-access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR mhealth and uhealth, is properly cited. The complete bibliographic information, a link to the original publication on http://mhealth.jmir.org/, as well as this copyright and license information must be included.