| Literature DB >> 35601137 |
Seyed Javad Khataeipour1, Javad Rahimipour Anaraki2, Arastoo Bozorgi1, Machel Rayner3, Fabien A Basset3, Daniel Fuller1,3.
Abstract
Objective: This study uses machine learning (ML) to develop methods for estimating activity type/intensity using smartphones, to evaluate the accuracy of these models for classifying activity, and to evaluate differences in accuracy between three different wear locations. Method: Forty-eight participants were recruited to complete a series of activities while carrying Samsung phones in three different locations: backpack, right hand and right pocket. They were asked to sit, lie down, walk and run three Metabolic Equivalent Task (METs), five METs and at seven METs. Raw accelerometer data were collected. We used the R, activity counts package, to calculate activity counts and generated new features based on the raw accelerometer data. We evaluated and compared several ML algorithms; Random Forest (RF), Support Vector Machine, Naïve Bayes, Decision Tree, Linear Discriminant Analysis and k-Nearest Neighbours using the caret package (V.6.0-86). Using the combination of the raw accelerometer data and the computed features leads to high model accuracy.Entities:
Keywords: Keywords
Year: 2022 PMID: 35601137 PMCID: PMC9086604 DOI: 10.1136/bmjsem-2021-001242
Source DB: PubMed Journal: BMJ Open Sport Exerc Med ISSN: 2055-7647
Figure 1Sixty-five minute lab-based activity protocol. MET, Metabolic Equivalent Task.
Performance of Random Forest algorithms for four difference cases in three phone locations; right hand, right pocketand backpack
| Accuracy | ROC | PR-AUC | Sensitivity | Specificity | |
| Right hand | |||||
| Case 1 | 66.8 | 0.91 | 0.71 | 0.65 | 0.93 |
| Case 2 | 40.3 | 0.72 | 0.34 | 0.38 | 0.88 |
| Case 3 | 89 | 0.99 | 0.95 | 0.89 | 0.98 |
| Case 4 | 48.5 | 0.83 | 0.52 | 0.46 | 0.90 |
| Right pocket | |||||
| Case 1 | 67.2 | 0.91 | 0.69 | 0.65 | 0.94 |
| Case 2 | 39.7 | 0.74 | 0.34 | 0.38 | 0.88 |
| Case 3 | 92.9 | 0.99 | 0.97 | 0.93 | 0.99 |
| Case 4 | 51.4 | 0.986 | 0.857 | 0.49 | 0.90 |
| Backpack | |||||
| Case 1 | 69.3 | 0.92 | 0.72 | 0.68 | 0.94 |
| Case 2 | 40.4 | 0.74 | 0.37 | 0.39 | 0.88 |
| Case 3 | 90.8 | 0.99 | 0.96 | 0.90 | 0.98 |
| Case 4 | 52.1 | 0.86 | 0.58 | 0.50 | 0.90 |
Case 1 features include only raw X, Y, Z acceleration. Case 2 feature includes only the vector magnitude of activity counts. Case 3 includes raw accelerometer data and 58 features. Case 4 includes the vector magnitude of activity counts and 58 features.
PR-AUC, area under the Precision-Recall curve; ROC, receiver operating characteristic.
Precision of Random Forest algorithms for each activity class/intensity for two cases in three phone locations; right hand, right pocket and backpack
| Case 3 | Backpack | Pocket | Hand |
| 7MET | 0.98 | 0.98 | 0.98 |
| 5MET | 0.83 | 0.83 | 0.83 |
| 3MET | 0.95 | 0.95 | 0.93 |
| Walking | 0.94 | 0.96 | 0.95 |
| Sitting | 0.96 | 0.97 | 0.96 |
| Lying | 0.97 | 0.98 | 0.98 |
| Case 4 | Backpack | Pocket | Hand |
| 7MET | 0.87 | 0.85 | 0.85 |
| 5MET | 0.84 | 0.84 | 0.82 |
| 3MET | 0.65 | 0.64 | 0.60 |
| Walking | 0.63 | 0.64 | 0.62 |
| Sitting | 0.62 | 0.62 | 0.65 |
| Lying | 0.70 | 0.70 | 0.75 |
Case 3 includes raw accelerometer data and 58 features. Case 4 includes the vector magnitude of activity counts and 58 features.
MET, Metabolic Equivalent Task.
Feature importance ranking for all cases
| Rank | Case 1 | Case 2 | Case 3 | Case 4 |
| 1 | Raw acceleration data in Y direction | Average of VM for three axes | SD in Y direction | Sum of counts’ Log-energy in Y direction |
| 2 | Raw acceleration data in X direction | Peak-to-peak amplitude in Y direction | Membership of Ntile Groups (N=5) of counts’ vector magnitude | |
| 3 | Raw acceleration data in Z direction | IQR in Y direction | Amplitude of dominant frequency of counts in Y direction | |
| 4 | Peak-to-peak amplitude in X direction | Average counts in Y direction | ||
| 5 | Membership of Ntile Groups (N=5) of vector magnitude | Vector magnitude of average counts in X, Y and Z directions | ||
| 6 | SD in x direction | Sum of counts in Y direction | ||
| 7 | IQR in X direction | counts’ vector magnitudes | ||
| 8 | SD in Z direction | Sum of counts’ Log-energy in X | ||
| 9 | Signal power in Y direction | Signal power of counts in Y | ||
| 10 | Sum of Log-energy in Y direction | Dominant frequency of counts in Y direction |
IQR, Interquartile Range; SD, Standard Deviation; VM, Vector Magnitude.