Abstract
Study design:
This was a cross-sectional study.
Objectives:
The main objective of this study was to develop and test classification algorithms based on machine learning using accelerometers to identify the activity type performed by manual wheelchair users with spinal cord injury (SCI).
Setting:
The study was conducted in the Physical Therapy department and the Physical Education and Sports department of the University of Valencia.
Methods:
A total of 20 volunteers were asked to perform 10 physical activities, lying down, body transfers, moving items, mopping, working on a computer, watching TV, arm-ergometer exercises, passive propulsion, slow propulsion and fast propulsion, while fitted with four accelerometers placed on both wrists, chest and waist. The activities were grouped into five categories: sedentary, locomotion, housework, body transfers and moderate physical activity. Different machine learning algorithms were used to develop individual and group activity classifiers from the acceleration data for different combinations of number and position of the accelerometers.
Results:
We found that although the accuracy of the classifiers for individual activities was moderate (55–72%), with higher values for a greater number of accelerometers, grouped activities were correctly classified in a high percentage of cases (83.2–93.6%).
Conclusions:
With only two accelerometers and the quadratic discriminant analysis algorithm we achieved a reasonably accurate group activity recognition system (>90%). Such a system with the minimum of intervention would be a valuable tool for studying physical activity in individuals with SCI.
Similar content being viewed by others
Introduction
Physical activity (PA) plays an important role in the health of individuals with spinal cord injury (SCI). PA is a protective factor that reduces the risk of illnesses such as cardiovascular disease and type II diabetes1, 2, 3 and other common comorbidities in this population (for example, pressure ulcers).4, 5
An appropriate method of quantifying PA levels in individuals with SCI during their daily activities is essential for several reasons.6 First, these methods may be used in epidemiological studies to establish more precisely the effects of PA on their health. Second, it can be used to monitor the effectiveness of PA promotion programs in this population. Finally, with the appropriate hardware and software, those suffering from SCI may carry out continuous control of their energy expenditure and thereby adjust their physical and nutritional habits to achieve a healthy lifestyle.
Accelerometers are currently the devices most commonly used to measure PA, although other methods such as heart rate7, 8 and questionnaires9, 10 have been validated for people with SCI. Early studies quantified PA by estimating energy expenditure. However, recent works estimate not only energy expenditure, but also the type of activity being carried out, according to the acceleration pattern produced,11, 12, 13, 14, 15, 16 important in studies on the SCI population. The performance of certain activities could either prevent or aggravate certain health problems (for example, shoulder pain).17, 18
Although studies have been published that establish the necessary mathematical models for estimating types of physical activities,11, 12, 13, 14, 15, 16 few of them have tackled this problem in subjects with SCI. Specifically, Postma et al.,19 using a total of six accelerometers, were able to identify wheelchair propulsion from other activities (for example, lying down, body transfer, doing dishes…). Their classifier achieved an accuracy of 92%. Later, Hiremath et al.20 classified the type of activity performed by SCI subjects using accelerometry, galvanic skin response, skin temperature and near-body temperatures. They were able to distinguish between resting, propulsion, arm-ergometer and deskwork, with an accuracy of 96.2% using quadratic discriminant analysis (QDA). Although four types of activities were included in this latter study, a broader study needed to be carried out in order to identify a wider range of activities. Therefore, the aims of the present work were:
-
1
To develop and test classification algorithms to identify (1) 10 individual activities and (2) 5 grouped activities, performed by manual wheelchair users with SCI equipped with accelerometers.
-
2
To establish the minimum number of accelerometers needed for a given accuracy for each application.
Materials and methods
Participants
A total of 20 subjects took part in the study [40.03 (10.57) years, 75.8 (17.54) kg and 1.76 (0.09) m]. The researchers recruited participants from two different institutions: (1) Hospital la Fe of Valencia and (2) Asociación Provincial de Lesionados Medulares y Grandes Discapacitados (ASPAYM). The subjects had suffered spinal damage between the T2 and L5 vertebrae, and had been diagnosed at least 1 year before the start of this study. The level and completeness of the SCI (Table 1) were determined by a complete neurological examination conducted by a medical specialist, using the American Spinal Injury Association Impairment Scale. Their independence status expressed as mean (s.d.) was 65.3 (7.61). This independence measurement was determined using Spinal Cord Independence Measure version III.21
The exclusion criteria were: (1) history of depressive or cognitive disorders; (2) posttraumatic cervical myelopathy, (3) motor or sensory impairment of the upper extremities, (4) ischemic heart disorder or recent osteoporotic fractures; (5) presence of tracheotomy; or (6) sacrotuberous ulcers or hypertension.
All the subjects gave written consent to participate in the study that was previously approved by the university’s ethical committee. We certify that all applicable institutional and governmental regulations concerning the ethical use of human volunteers were followed during the course of this research.
Data collection
The subjects were asked to perform 10 physical activities (using their own wheelchair): lying down, body transfers, moving items, mopping, working on a computer, watching TV, arm-ergometer exercise, passive propulsion, slow propulsion and fast propulsion. A detailed description of each activity can be found in a previous study.22 Each activity was carried out for 10 min with 1–2 min of rest between activities, with only one exception in the case of body transfers, in which the activity took place for 1 min followed by 1 min of rest for a total of 10 min to avoid overloading the shoulder musculoskeletal system. All these measurements have been supervised by the same researcher to ensure the successful completion of these activities.
During these activities, body forces were monitored by four accelerometers (Actigraph model GT3X, Actigraph, Pensacola, FL, USA) having the sampling frequency of 30 Hz. A bandpass digital filter between 0.25 and 2.5 Hz was implemented in order to reduce the influence of the static acceleration and the higher frequency components (manufacturer hardware characteristic). Then, the accelerations (expressed in counts) were rectified and integrated in 1-s epochs. The accelerometers were placed one on each wrist, one on the nondominant waist and on the nondominant side of the chest (Figure 1). Elastic belts were used in order to minimize movements of the accelerometers, and the spatial orientation was similar in all the subjects.
Signal processing
The Matlab R2012a (Mathworks Inc., Natick, MA, USA) was used for signals processing. We worked out 14 variables for each axis (that is, X, Y, Z and resultant vector) at 4, 5, 6 and 7 min for each activity.
The s.d., variance and the 10th, 25th, 50th, 75th and 90th percentiles, interquartile range and the range between the 10th and 90th percentiles were calculated in the time domain. The lag-one correlation of each min was also worked out as a measure of temporal dynamics.15
The acceleration signal was analyzed using the two-level wavelet transform, the mother wavelet being Daubechies 2.23 We calculated the Euclidean norm of the detail coefficients of the first and second levels of resolution and the approximation coefficients of the second level (that is, ND1, ND2, NA2).
The sample entropy was computed for each axis (tolerance=0.3 s.d.; patter length=2).24 Finally, we computed the cross-correlation between the three orthogonal axes (that is, x–y, y–z and x–z cross-correlations).25 The total number of variables was 59 for each accelerometer (that is, 14 variables for the four axes and three variables for the correlation between axes).
Data analysis
Classifiers were designed for individual activities and grouped activities; those for individual activities had 10 possible categories (that is, each activity performed) and grouped activities had 5 categories (Table 2), established according to the activity’s objective or function.
In order to determine the required number of accelerometers to properly identify the activities or groups of activities, the data from several accelerometers were combined. The configurations tested were: (1) dominant wrist accelerometer, (2) nondominant wrist accelerometer, (3) both wrist accelerometers and (4) all four accelerometers.
The first step was to split the database (800 data=20 subjects × 10 PAs × 4 min per PA) into two data sets (Figure 2). One was used to train and validate the classifiers (n=640) and the other to test them (n=160). We checked that there were no statistically significant differences in the computed variables between data sets by means of the Wilcoxon rank sum test (P>0.05) and that the percentage of cases of each activity was the same in both data sets.
A principal component analysis was then applied to reduce the dimensions of the data matrix parameters. This analysis was applied to the training set of the above-cited four combinations of accelerometers. These databases were reduced from 59, 59, 118 and 236 variables, respectively to 22, 22, 41 and 78 principal components (99% of the variance was maintained). The coefficients of this analysis of the training set were applied to the test set so as to obtain the principal components of these data. The principal components of the two data sets were used as inputs in the subsequent analysis.
We used three different machine learning algorithms to design the classifiers:26 linear discriminant analysis, QDA and support vector machines (SVMs). The classifiers were designed and validated using a 10-fold stratified cross-validation that was performed 20 times to reduce the randomization effect. The optimal combination of variables was determined using a forward sequential feature selection algorithm that included only those variables that significantly improved classifier accuracy. The feature selection algorithm stopped when the addition of any new variable did not improve classifier accuracy by 0.5%. Once the classifiers were designed with the training set, we applied them to the test set and computed the classification accuracy:
Results
Table 3 shows the accuracy of the different classifiers implemented in the test set using the information from the different accelerometer configurations to distinguish each of the 10 individual activity types. As expected, it can be seen that in general the accuracy of the classifier improves as the number of accelerometers increases. However, the accuracy obtained is always <75%, regardless of the number/position of the accelerometer and the classification algorithm used.
Figure 3 shows the accuracy of the individual activity classifiers in each of the 10 categories. It can be observed that in many activities accuracy values near or above 90% are achieved, particularly when two or four accelerometers are used. However, some activities (for example, PC work or passive propulsion), which could be confused with each other, have particularly low accuracy values, giving a slightly low overall accuracy value for the classifier.
On the other hand, the grouped activity classifiers showed good accuracy in all cases (between 83.2 and 93.6%; Table 4). Again, it can be seen that in general, the higher the number of accelerometers, the higher the classification accuracy. In contrast, the classification algorithm does not seem to significantly influence the prediction capability. It is noteworthy that there are three classifiers with accuracy values above 90%: (1) two wrists with QDA, (2) all with QDA and (3) all with SVMs.
The accuracy of the classifiers for each category is shown in Figure 4. It can be observed that those with the lowest values are body transfers and locomotion. It is also noteworthy that the accuracies of the body transfer and housework categories seem to be the most dependent on the number of accelerometers used, whereas the accuracy of the other three categories is fairly stable, regardless of the number of accelerometers and algorithms used.
Finally, Table 5 shows the confusion matrix of the QDA classifier for grouped activities that uses information from the accelerometers on both wrists. As shown, the rate of properly classified sedentary activities is very high (93.75–100%) and only 6.25% of the cases of working with computers or passive propulsion are misclassified. The classification error in the locomotion category is mainly because of the fact that the slow propulsion activity is misclassified as housework in 39.34% of cases. In the housework category, high accuracy values are observed for both activities. Of the cases, 90.56% of the moving items cases and 85.94% of the mopping cases were properly classified; 14.41% of the transferring activity cases were misclassified as housework. Finally, it is noteworthy that 100% accuracy is reached in moderate physical activity
Discussion
In the present work we designed and implemented several classifiers using only recordings from accelerometers in SCI patients to distinguish (1) 10 individual activities and (2) 5 categories of grouped activities according to the activity’s aim or function. None of the classifiers obtained an overall accuracy of >73% in identifying the 10 activities, regardless of the number of accelerometers and the algorithm used. The relatively low values are most likely because of the fact that some of the activities shared similar patterns, for example, watching television, working with a PC or passive propulsion. Additional information would be needed to overcome this limitation.
When the activities were grouped by their aim or function, promising results were obtained. In general, it has been observed that the more accelerometers used, the higher the classifier accuracy. Three classifiers were obtained with an average accuracy of >90%: (1) two wrists with QDA, (2) all with QDA and (3) all with SVMs. In configurations (2) and (3), the use of four accelerometers did not provide a significant increase in the accuracy of the classifier using the QDA algorithm. Compared with configuration (3), classifier (1) has the advantage that the QDA algorithm is computationally much more efficient and could be easily implemented in a real-time system. Moreover, using only two accelerometers greatly simplifies the recording protocol and also improves patient comfort during recording. This suggests that the optimal setting of the classifier to distinguish the five categories of SCI activities tested was obtained with the QDA algorithm and the accelerometers on both wrists.
Sedentary activities and moderately intensive physical activities obtained good rates of correct classification (always >93.75%). These results are comparable with those of other authors who obtained 92% accuracy in distinguishing different activities in SCI patients.19 However, in this latter study, six accelerometers were used and only two categories were classified: two types of wheelchair propulsion versus other activities: lying down, body transfer and doing dishes.19 The accuracy values obtained in the present work are similar to those obtained by other authors:20 it obtained 96.2% in identifying four types of activities (rest, deskwork, arm-ergometer and propulsion). Unlike other authors who used input variables of acceleration, galvanic skin response, skin temperature and near body,20 in the present work only acceleration data (from the two wrists) were used.
On the other hand, the accuracy values obtained for the activity recognition systems in SCI patients compare favorably with those published regarding the able-bodied population. Trost et al.16 obtained 88.4% accuracy in classifying activities clustered into the following categories: sedentary, light household activities and games, household activities and moderate-to-high-intensity sports, walking and running. In addition, in this context, Khan et al.12 reached 97.9% of properly classified recording time in the following activities: lying, standing, walking and running. Liu et al.13 combined several sensors (two accelerometers and a flow meter) and achieved 84.7% correct classification in 13 different activities. Therefore, the activity recognition systems proposed in the present study show similar accuracy to those in other populations when considering groups of similar activities.
It is remarkable that the grouped activities classifier, employing the recordings from two accelerometers with the QDA algorithm, often identified some locomotion activities, such as housework. In spite of the fact that rapid propulsion was correctly distinguished from other household chores, probably because of the greater magnitude of the accelerations, slow propulsion was misclassified as housework in 39.34% of cases. This may be because while performing household tasks (mopping or moving objects) the subjects had to propel the wheelchair at a slow speed (similar to slow propulsion). The inclusion of additional parameters that take into account the temporal structure of the data or the variation of the spectral parameters over time could help to improve accuracy in these cases.
Finally, this study has some limitations. First, it would be advisable to expand the database in terms of the numbers of both subjects and activities. Second, although some extent of variability has been included in the data used to design the classifiers as participants used their own wheelchair that could have different dynamic responses for each of the movements, the physical activities were carried out in a controlled environment, following the instructions of a supervisor, with a break between activities so as to minimize fatigue. Future studies should confirm the good results obtained in this work in conditions closer to everyday life. In such conditions, events such as transitions between activities, the type or inclination of the surfaces and so on could worsen classification accuracy. In summary, we believe that this work provides the basis for a minimally intrusive expert system that would monitor daily physical activity in SCI subjects, for whom monitoring is of great significance.
In short, the highest accuracy values (83.2–93.6%) were those obtained on activities grouped according to objective or function. Classifiers of individual activities showed lower classification accuracy (55–72.5%). The best performance was obtained from four accelerometers and QDA or SVM algorithms. However, an activity recognition system with good accuracy (>90%) was also achieved with only two accelerometers and the QDA algorithm. Because of the fact that two accelerometers are less stressful for the subject, it would be useful to implement this system in future studies to identify activities in subjects with SCI.
References
Buchholz AC, Martin Ginis KA, Bray SR, Craven BC, Hicks AL, Hayes KC et al. Greater daily leisure time physical activity is associated with lower chronic disease risk in adults with spinal cord injury. Appl Physiol Nutr Metab 2009; 34: 640–647.
Hetz SP, Latimer AE, Buchholz AC, Martin Ginis KA . Increased participation in activities of daily living is associated with lower cholesterol levels in people with spinal cord injury. Arch Phys Med Rehabil 2009; 90: 1755–1759.
Manns PJ, Chad KE . Determining the relation between quality of life, handicap, fitness, and physical activity for persons with spinal cord injury. Arch Phys Med Rehabil 1999; 80: 1566–1571.
Serra-Añó P, Pellicer-Chenoll M, García-Massó X, Morales J, Giner-Pascual M, González L-M . Effects of resistance training on strength, pain and shoulder functionality in paraplegics. Spinal Cord 2012; 50: 827–831.
Slater D, Meade MA . Participation in recreation and sports for persons with spinal cord injury: review and recommendations. NeuroRehabilitation 2004; 19: 121–129.
Lee M, Zhu W, Hedrick B, Fernhall B . Determining metabolic equivalent values of physical activities for persons with paraplegia. Disabil Rehabil 2010; 32: 336–343.
Lee M, Zhu W, Hedrick B, Fernhall B . Estimating MET values using the ratio of HR for persons with paraplegia. Med Sci Sports Exerc 2010; 42: 985–990.
Hayes AM, Myers JN, Ho M, Lee MY, Perkash I, Kiratli BJ . Heart rate as a predictor of energy expenditure in people with spinal cord injury. J Rehabil Res Dev 2005; 42: 617–624.
Washburn RA, Zhu W, McAuley E, Frogley M, Figoni SF . The physical activity scale for individuals with physical disabilities: development and evaluation. Arch Phys Med Rehabil 2002; 83: 193–200.
Ginis KAM, Latimer AE, Hicks AL, Craven BC . Development and evaluation of an activity measure for people with spinal cord injury. Med Sci Sports Exerc 2005; 37: 1099–1111.
Khan AM, Lee Y-K, Lee S, Kim T-S . Accelerometer’s position independent physical activity recognition system for long-term activity monitoring in the elderly. Med Biol Eng Comput 2010; 48: 1271–1279.
Khan AM, Lee Y-K, Lee SY, Kim T-S . A triaxial accelerometer-based physical-activity recognition via augmented-signal features and a hierarchical recognizer. IEEE Trans Inf Technol Biomed Publ 2010; 14: 1166–1172.
Liu S, Gao RX, John D, Staudenmayer J, Freedson PS . SVM-based multi-sensor fusion for free-living physical activity assessment. Conf Proc Annu Int Conf IEEE Eng Med Biol Soc 2011; 2011: 3188–3191.
Liu S, Gao RX, John D, Staudenmayer JW, Freedson PS . Multisensor data fusion for physical activity assessment. IEEE Trans Biomed Eng 2012; 59: 687–696.
Staudenmayer J, Pober D, Crouter S, Bassett D, Freedson P . An artificial neural network to estimate physical activity energy expenditure and identify physical activity type from an accelerometer. J Appl Physiol 2009; 107: 1300–1307.
Trost SG, Wong W-K, Pfeiffer KA, Zheng Y . Artificial neural networks to predict activity type and energy expenditure in youth. Med Sci Sports Exerc 2012; 44: 1801–1809.
David Apple MD . Pain above the injury level. Top Spinal Cord Inj Rehabil 2001; 7: 18–29.
Subbarao JV, Klopfstein J, Turpin R . Prevalence and impact of wrist and shoulder pain in patients with spinal cord injury. J Spinal Cord Med 1995; 18: 9–13.
Postma K, van den Berg-Emons HJG, Bussmann JBJ, Sluis TAR, Bergen MP, Stam HJ . Validity of the detection of wheelchair propulsion as measured with an Activity Monitor in patients with spinal cord injury. Spinal Cord 2005; 43: 550–557.
Hiremath SV, Ding D, Farringdon J, Vyas N, Cooper RA . Physical activity classification utilizing SenseWear activity monitor in manual wheelchair users with spinal cord injury. Spinal Cord 2013; 51: 705–709.
Itzkovich M, Gelernter I, Biering-Sorensen F, Weeks C, Laramee MT, Craven BC et al. The Spinal Cord Independence Measure (SCIM) version III: reliability and validity in a multi-center international study. Disabil Rehabil 2007; 29: 1926–1933.
García-Massó X, Serra-Añó P, García-Raffi LM, Sánchez-Pérez EA, López-Pascual J, Gonzalez LM . Validation of the use of Actigraph GT3X accelerometers to estimate energy expenditure in full time manual wheelchair users with spinal cord injury. Spinal Cord 2013; 51: 898–903.
Preece SJ, Goulermas JY, Kenney LPJ, Howard D . A comparison of feature extraction methods for the classification of dynamic activities from accelerometer data. IEEE Trans Biomed Eng 2009; 56: 871–879.
Hurd WJ, Morrow MM, Kaufman KR . Tri-axial accelerometer analysis techniques for evaluating functional use of the extremities. J Electromyogr Kinesiol 2013; 23: 924–929.
Teixeira FG, Jesus IRT, Mello RGT, Nadal J . Cross-correlation between head acceleration and stabilograms in humans in orthostatic posture. Conf Proc Annu Int Conf IEEE Eng Med Biol Soc 2012; 2012: 3496–3499.
Hastie T, Tibshirani R, Friedman J . The Elements of Statistical Learning. Data Mining, Inference, and Prediction. Springer: New York, NY. 2009.
Acknowledgements
X García-Massó gratefully acknowledges the support of the University of Valencia under project UV-INV-PRECOMP13-115364.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Competing interests
The authors declare no conflict of interest.
Rights and permissions
About this article
Cite this article
García-Massó, X., Serra-Añó, P., Gonzalez, L. et al. Identifying physical activity type in manual wheelchair users with spinal cord injury by means of accelerometers. Spinal Cord 53, 772–777 (2015). https://doi.org/10.1038/sc.2015.81
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1038/sc.2015.81