| Literature DB >> 31973129 |
Hoda Allahbakhshi1, Lindsey Conrow1,2, Babak Naimi3, Robert Weibel1,2.
Abstract
This paper aims to examine the role of global positioning system (GPS) sensor data in real-life physical activity (PA) type detection. Thirty-three young participants wore devices including GPS and accelerometer sensors on five body positions and performed daily PAs in two protocols, namely semi-structured and real-life. One general random forest (RF) model integrating data from all sensors and five individual RF models using data from each sensor position were trained using semi-structured (Scenario 1) and combined (semi-structured + real-life) data (Scenario 2). The results showed that in general, adding GPS features (speed and elevation difference) to accelerometer data improves classification performance particularly for detecting non-level and level walking. Assessing the transferability of the models on real-life data showed that models from Scenario 2 are strongly transferable, particularly when adding GPS data to the training data. Comparing individual models indicated that knee-models provide comparable classification performance (above 80%) to general models in both scenarios. In conclusion, adding GPS data improves real-life PA type classification performance if combined data are used for training the model. Moreover, the knee-model provides the minimal device configuration with reliable accuracy for detecting real-life PA types.Entities:
Keywords: GIS; GPS; physical activity type; real-life
Year: 2020 PMID: 31973129 PMCID: PMC7038120 DOI: 10.3390/s20030588
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1The location of smartphone and uTrail devices (orange circles) on the participants’ body.
Activity tasks for the semi-structured data collection.
| Activity Task (I) | Activity Task (II) | Duration: 16.5 + 16.5 + 33 1.5 h |
|---|---|---|
| First step: Walking at different speed | ||
| Jump and stand still for 5 s at starting point | Jump and stand still for 5 s at starting point | 3 + 3 |
| Walk at SLOW speed | Walk at NORMAL speed | |
| Turn left at turning point (sharp turn) | Turn right at turning point (smooth turn) | |
| Walk at SLOW speed | Walk at NORMAL speed | |
| Stop at the stop point for 5 s | Stop at the stop point for 5 s | |
| Walk at FAST speed | Walk at FAST speed | |
| Stop at the stop point for 5 s | Stop at the stop point for 5 s | |
| Walk at NORMAL speed | Walk at SLOW speed | |
| turn left at point (smooth turn) | turn right at turning point (sharp turn) | |
| Walk at NORMAL speed | Walk at SLOW speed | |
| Stand still for 5 s at end point and jump | Stand still for 5 s at starting point and jump | |
| Second step: Running | ||
| Jump and stand still for 5 s at starting point | Jump and stand still for 5 s at starting point | 1.5 + 1.5 |
| Run at self-paced speed | Run at self-paced speed | |
| Turn left at turning point (sharp turn) | Turn right at turning point (smooth turn) | |
| Run at self-paced speed | Run at self-paced speed | |
| Stop at the stop point for 5 s | Stop at the stop point for 5 s | |
| Run at self-paced speed | Run at self-paced speed | |
| Turn left at turning point (smooth turn) | Turn right at turning point (sharp turn) | |
| Run at self-paced speed | Run at self-paced speed | |
| Stand still for 5 s at starting point and jump | Stand still for 5 s at starting point and jump | |
| Third step: Cycling | ||
| Jump and stand still for 5 s at starting point | Jump and stand still for 5 s at starting point | 1.5 + 1.5 |
| Get on the cycle | Get on the cycle | |
| Cycle at self-paced speed | Cycle at self-paced speed | |
| Turn left at the turning point | Turn right at the turning point | |
| Cycle at self-paced speed | Cycle at self-paced speed | |
| Turn left at the turning point | Turn right at the turning point | |
| Stop at the ending point | Stop at the ending point | |
| Get off the cycle | Get off the cycle | |
| Stand still for 5 s at starting point and jump | Stand still for 5 s at starting point and jump | |
| Fourth step: Stairs walking | ||
| Jump and stand still for 5 s at starting point | Jump and stand still for 5 s at starting point | 1 + 1 |
| Walk upstairs at normal speed | Walk upstairs at normal speed | |
| Stand still for 5 s after first floor | Stand still for 5 s after first floor | |
| Walk upstairs at normal speed | Walk upstairs at normal speed | |
| Stand still for 5 s at ending point and jump | Stand still for 5 s at ending point and jump | |
| Jump and stand still for 5 s at starting point | Jump and stand still for 5 s at starting point | 1 + 1 |
| Walk downstairs at normal speed | Walk downstairs at normal speed | |
| Stand still for 5 s after first floor | Stand still for 5 s after first floor | |
| Walk downstairs at normal speed | Walk downstairs at normal speed | |
| Stand still for 5 s at ending point and jump | Stand still for 5 s at ending point and jump | |
| Fifth step: Walking at different slopes | ||
| Jump and stand still for 5 s at starting point | Jump and stand still for 5 s at starting point | 2 + 2 |
| Walk uphill at normal speed | Walk uphill at normal speed | |
| Stand still for 5 s at ending point and jump | Stand still for 5 s at ending point and jump | |
| Jump and stand still for 5 s at starting point | Jump and stand still for 5 s at starting point | 2 + 2 |
| Walk downhill at normal speed | Walk downhill at normal speed | |
| Stand still for 5 s at ending point and jump | Stand still for 5 s at ending point and jump | |
| Sixth step: Sedentary activities | ||
| Sit | ||
| Jump | Jump | 1 + 1 |
| Go from standing position to sitting | Go from standing position to sitting | |
| Sit for 1 min | Sit for 1 min | |
| Go from sitting position to standing | Go from sitting position to standing | |
| Stand | Stand | |
| Jump | Jump | |
| Stand | ||
| Jump | Jump | 1 + 1 |
| Stand for 1 min | Stand for 1 min | |
| Jump | Jump | |
| Lie | ||
| Jump | Jump | 1 + 1 |
| Go from standing position to sitting | Go from standing position to sitting | |
| Sit | Sit | |
| Go from sitting position to lying on your back | Go from sitting position to lying on your back | |
| Lie on your back for 1 min | Lie on your back for 1 min | |
| Go from lying on your back to sitting position | Go from lying on your back to sitting position | |
| Sit | Sit | |
| Go from sitting position to standing | Go from sitting position to standing | |
| Stand | Stand | |
| Jump | Jump | |
Activity tasks for the real-life data collection.
| Activity | Minimum Duration (Minute) | Location |
|---|---|---|
| Sedentary activities | ||
| Lying | 1 | Outdoors (e.g., on a bench) |
| Sitting | 1 | Outdoors (not in a vehicle) |
| Standing | 1 | Outdoors (not in a vehicle) |
| Non-level walking | ||
| Walking uphill | 2 | Outdoors |
| Walking downhill | 2 | Outdoors |
| Walking downstairs | 2 floors (8 steps each) | Outdoors |
| Walking upstairs | 2 floors (8 steps each) | Outdoors |
| Transport-related activities | ||
| Walking, level ground | 5 | Leisure area (e.g., park) |
| 5 | Urban area (e.g., street sidewalk) | |
| Cycling, level ground | 5 | Leisure area (e.g., park) |
| 5 | Urban area (e.g., street bike path) | |
| Running, level ground | 1 | Leisure area (e.g., park) |
| 1 | Urban area (e.g., street sidewalk) | |
Labeled data collected for the study.
| Dataset | Total Acc. Data | Total GPS Data | Acc. Data per Person | GPS Data per Person |
|---|---|---|---|---|
| Semi-structured | 61.6 h (11,098,581) | 59.6 h (214,628) | 1.8 h (336,320.6) | 1.8 h (6503.879) |
| Real-life | 99.5 h (17,918,884) | 101.5 h (365,631) | 3 h (542,996.5) | 3 h (11,079.73) |
| Total | 161 h (29,017,465) | 161 h (580,259) | 4.8 h (879,317.1) | 4.8 h (17,583.61) |
Figure A1Nationality of the participants involved in the study.
Physical characteristics of the participants involved in the study.
| Physical Characteristics | Mean (SD) |
|---|---|
| No. (F/M) | 33 (13/20) |
| Age (year) | 29 ± (5.6) |
| Height (cm) | 173 ± (10.05) |
| Weight (kg) | 67 ± (9.8) |
| BMI (kg·m−2) | 22 ± (1.9) |
Figure 2Map-matched global positioning system (GPS) points of data collected by a single participant in real-life using OpenStreetMap (OSM) data.
Scenarios for separating data into a train and test data set and the corresponding validation method.
| Scenario No. | Training Dataset | Validation Method and Test Data |
|---|---|---|
| Scenario 1 | Semi-structured dataset | L1SO cross validation on semi-structured data |
| Scenario 2 | Combined semi-structured and real-life dataset | L1SO cross validation on combined data |
Figure 3Overall accuracy of the RF classification models trained with semi-structured data, (a) accelerometer data only and (b) accelerometer and GPS data.
Figure 4The distribution of overall accuracy among all participants for the RF classification models trained with semi-structured data, (a) accelerometer data only and (b) accelerometer and GPS data.
Confusion matrix of a participant (with the highest GPS contribution) when using accelerometer data only (Scenario 1).
| Accelerometer Only | Cycle | Lie | N_Walk | Run | Sit | Stand | Walk | Recall | Precision | F1 |
|---|---|---|---|---|---|---|---|---|---|---|
|
| 168 | 0 | 9 | 0 | 0 | 0 | 0 |
|
|
|
|
| 0 | 124 | 0 | 0 | 0 | 1 | 0 | 99 | 99 | 99 |
|
| 0 | 0 | 209 | 0 | 0 | 0 | 163 |
|
|
|
|
| 1 | 0 | 0 | 113 | 0 | 0 | 0 | 100 | 99 | 100 |
|
| 0 | 1 | 0 | 0 | 108 | 0 | 0 | 99 | 99 | 99 |
|
| 0 | 0 | 0 | 0 | 1 | 62 | 0 | 98 | 98 | 98 |
|
| 47 | 0 | 279 | 0 | 0 | 0 | 394 |
|
|
|
Confusion matrix of a participant (with the highest GPS contribution) when using accelerometer and GPS data (Scenario 1).
| Accelerometer & GPS | Cycle | Lie | N_Walk | Run | Sit | Stand | Walk | Recall | Precision | F1 |
|---|---|---|---|---|---|---|---|---|---|---|
|
| 165 | 0 | 10 | 0 | 0 | 0 | 0 |
|
|
|
|
| 0 | 124 | 0 | 0 | 0 | 1 | 0 | 99 | 99 | 99 |
|
| 0 | 0 | 278 | 0 | 0 | 0 | 89 |
|
|
|
|
| 1 | 0 | 0 | 112 | 0 | 0 | 0 | 100 | 99 | 100 |
|
| 0 | 1 | 0 | 0 | 107 | 0 | 0 | 100 | 99 | 100 |
|
| 0 | 0 | 0 | 0 | 0 | 66 | 0 | 99 | 100 | 99 |
|
| 2 | 0 | 192 | 0 | 0 | 0 | 523 |
|
|
|
Figure A2Top 30 important features of a participant’s general RF model (with the highest GPS contribution) trained with semi-structured data (see the feature description in Table A3). (a) Accelerometer data only and (b) accelerometer and GPS data.
Figure 5Overall accuracy of the RF classification models trained with combined dataset, (a) accelerometer data only and (b) accelerometer and GPS data.
Figure 6The distribution of overall accuracy among all participants for the RF classification models trained combined dataset, (a) accelerometer data only and (b) accelerometer and GPS data.
Confusion matrix of a participant (with the highest GPS contribution) when using accelerometer data only (Scenario 2).
| Accelerometer only | Cycle | Lie | N_Walk | Run | Sit | Stand | Walk | Recall | Precision | F1 |
|---|---|---|---|---|---|---|---|---|---|---|
|
| 743 | 0 | 2 | 0 | 0 | 0 | 0 | 100 | 100 | 100 |
|
| 0 | 185 | 1 | 0 | 1 | 0 | 0 | 99 | 99 | 99 |
|
| 2 | 0 | 800 | 1 | 0 | 0 | 91 |
|
|
|
|
| 0 | 0 | 0 | 320 | 0 | 0 | 0 | 99 | 100 | 100 |
|
| 0 | 1 | 0 | 0 | 170 | 1 | 0 | 99 | 99 | 99 |
|
| 0 | 1 | 0 | 0 | 0 | 157 | 0 | 99 | 99 | 99 |
|
| 0 | 0 | 233 | 2 | 0 | 1 | 885 |
|
|
|
Confusion matrix of a participant (with the highest GPS contribution) when using accelerometer and GPS data (Scenario 2).
| Accelerometer & GPS | Cycle | Lie | N_Walk | Run | Sit | Stand | Walk | Recall | Precision | F1 |
|---|---|---|---|---|---|---|---|---|---|---|
|
| 738 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 100 | 100 |
|
| 0 | 186 | 1 | 0 | 0 | 0 | 0 | 99 | 99 | 99 |
|
| 1 | 0 | 810 | 1 | 0 | 0 | 63 |
|
|
|
|
| 0 | 0 | 0 | 318 | 0 | 0 | 1 | 99 | 100 | 99 |
|
| 0 | 1 | 0 | 0 | 166 | 1 | 0 | 98 | 99 | 99 |
|
| 0 | 1 | 0 | 0 | 3 | 158 | 0 | 99 | 98 | 98 |
|
| 1 | 0 | 97 | 2 | 0 | 1 | 1018 |
|
|
|
Figure A3Top 30 important features of a participant’s general RF model (with the highest GPS contribution) trained with combined data (see the feature description in Table A3). (a) Accelerometer data only and (b) accelerometer and GPS data.
Figure 7Sensitivity analysis on segment size, (a) general model trained with semi-structured dataset and (b) general model trained with combined dataset.
Confusion matrix of a participant when using accelerometer and GPS data for knee position. (Scenario 2).
| Accelerometer & GPS | Cycle | Lie | N_Walk | Run | Sit | Stand | Walk | Recall | Precision | F1 |
|---|---|---|---|---|---|---|---|---|---|---|
|
| 1245 | 0 | 8 | 1 | 0 | 0 | 11 | 98 | 98 | 98 |
|
| 0 | 196 | 0 | 0 | 0 | 0 | 0 | 100 | 100 | 100 |
|
| 21 | 0 | 536 | 0 | 0 | 1 | 145 | 76 | 91 | 83 |
|
| 0 | 0 | 3 | 254 | 0 | 0 | 3 | 98 | 99 | 98 |
|
| 1 | 0 | 1 | 0 | 195 | 2 | 0 | 98 | 93 | 95 |
|
| 0 | 0 | 0 | 0 | 15 | 259 | 0 | 95 | 99 | 97 |
|
| 0 | 0 | 43 | 1 | 0 | 0 | 1029 | 96 | 87 | 91 |
List of features appearing in Figure A2 and Figure A3.
| Feature Notation | Description |
|---|---|
| 1, 2, 3, 4, 5 | 1 = Chest sensor’s data |
| SVM | Total acceleration |
| Avg-SVM, Avg-acc-x, Avg-acc-y, Avg-acc-z | Mean of total acceleration and each axis |
| Std-SVM, Std-x, Std-y, Std-z | Standard deviation of total acceleration and each axis |
| BinN, BinNx, BinNy, BinNz | Number of observations falling within the Nth bin of total acceleration and each axis |
| Avgabsdiff, Avgabsdiffx, Avgabsdiffy, Avgabsdiffz | Average absolute difference of total acceleration and each axis |
| RangeSVM, Rangex, Rangey, Rangez | Range of total acceleration and each axis |
| APSD, APSDx, APSDy, APSDz | Power spectral density of total acceleration and each axis |
| ef, efx, efy, efz | Energy of total acceleration and each axis |
| ADF1, ADF1x, ADF1y, ADF1z | Amplitude of the first dominant frequency of total acceleration and each axis |
| ADF2, ADF2x, ADF2y, ADF2z | Amplitude of the second dominant frequency of total acceleration and each axis |
| ADF2, ADF2x, ADF2y, ADF2z | Amplitude of the third dominant frequency of total acceleration and each axis |