Journal Logo


Evaluation of Neural Networks to Identify Types of Activity Using Accelerometers


Author Information
Medicine & Science in Sports & Exercise: January 2011 - Volume 43 - Issue 1 - p 101-107
doi: 10.1249/MSS.0b013e3181e5797d
  • Free


The accurate assessment of physical activity is essential for the examination of trends in physical activity, the improvement of our understanding of the dose-response relationship between physical activity and health, the identification of determinants of physical activity, the detection of people at risk, and the evaluation of intervention strategies designed to increase physical activity (20).

There are numerous methods available for assessing physical activity, such as double-labeled water, direct observation, calorimetry, HR monitors, accelerometers, and self-reports (20). Physical activity has traditionally been measured with self-reports. Self-reports are easily administered, low-cost methods that provide information about the self-perceived frequency, intensity, duration, and types of activity people engage in during specific periods of time within specific settings. However, self-reports tend to overestimate the time spent in vigorous physical activities and to underestimate the time spent in unstructured daily physical activities, such as walking (1,13,18). By contrast, with self-reports, accelerometers are not influenced by recall bias or social desirability. These lightweight, unobtrusive devices provide objective information about the frequency, intensity, and duration of physical activity. Accelerometers have, therefore, in recent times, become the method of choice in physical activity research. However, most accelerometers are not waterproof (5). In addition, they cannot register, or they underestimate, the intensity of certain activities such as using the stairs, weight lifting, cycling, and rowing (7,16,18). Furthermore, accelerometers do not provide information about the type of activity people engage in.

Recently, an alternative strategy for coping with some of the weaknesses of accelerometers has been suggested (6): the use of more sophisticated statistical techniques for analyzing accelerometer data, examples being approaches based on pattern recognition such as quadratic discriminant analysis (11), decision trees (2), or artificial neural network (ANN) models (15,17). By contrast, with more traditional approaches to handling accelerometer data, such as reporting the average daily activity level or the time spent at different intensity levels, these more advanced statistical techniques aim to detect different types of activity at each time point. Approaches based on pattern recognition are used to distinguish between activities that produce similar total acceleration over time but different energy expenditure or between activities that have similar energy expenditure but different total acceleration over time. In this way, time spent at different intensity levels can be estimated more accurately. In addition, it provides an insight into the contribution of different types of activity to total physical activity or total energy expenditure. Furthermore, pattern recognition-based approaches can be useful in distinguishing between periods of sedentary activities, periods of sleeping, and periods when the accelerometer is not worn.

To date, most of the pattern recognition-based algorithms and models are based on accelerometer data from a limited number of laboratory activities (11,15). It is questionable whether laboratory-derived algorithms and models can be applied to free-living activities. Furthermore, in most studies to date, a single device is placed on a subject's hips (11,15,17). A model based on hip accelerometer data may not correctly classify certain physical activity types, such as cycling (17). Placing the accelerometer on the ankle may be a better alternative, improving the model's accuracy in terms of classifying the type of activity. The first aim of this study was therefore to develop, compare, and evaluate two ANN models-one based on data from a hip accelerometer and the other based on data from an ankle accelerometer-for the classification of free-living physical activities (i.e., sitting, standing, using the stairs, walking, and cycling). Subsequently, the surplus value of a combined ANN model based on the data from both accelerometers was tested. The second purpose of the study was to determine whether the three ANN models could discriminate between two self-paced speeds for the same activity (i.e., regular vs brisk walking or cycling).


Subjects and data collection.

Forty-nine healthy subjects (21 men and 28 women) between the age of 22 and 62 yr participated in the study. The characteristics of the sample are shown in Table 1. Each subject was observed by a research assistant during a controlled sequence of 45 min comprising the following activities: sitting, standing, using the stairs, walking, and cycling. To imitate free-living activities, all activities were performed at a self-paced speed. Walking and cycling were performed at two self-paced speeds: "regular" and "brisk." Each subject walked indoors as well as outdoors. Cycling was outdoors on a single-speed bicycle. All activities were conducted in similar weather conditions (i.e., no rain, mild wind). The subjects wore two ActiGraph accelerometers (GT1M; ActiGraph, Pensacola, FL), one on the right hip and one on the right ankle. The ActiGraph is the most widely used uniaxial motion sensor. It has good reproducibility, validity, and feasibility when used to assess physical activity patterns or to estimate energy expenditure (5,21). Accelerometer data (counts) were collected in 1-s epochs. Body height and body weight were measured with a portable stadiometer (Seca 225; Vogel & Halke GmbH & Co., Hamburg, Germany) and a digital scale (Soehnle 62882; Leifheit AG, Nassau, Germany).

Sample characteristics (mean ± SD).

The Central Committee on Research involving Human Subjects (Dutch CCMO) offers a stepwise procedure to find out whether a study has to be reviewed according to the Dutch law: "Medical Research Involving Human Subject Act (WMO)." As permitted by law, the first step in this procedure (i.e., whether the study protocol has to be reviewed in full by an independent committee) was taken care of by an internal committee at TNO Quality of Life, Zeist (The Netherlands). The decision of TNO was based on the WMO requirements for studies involving human subjects to undergo a medical ethics review if they meet the following criteria: 1) if the study involves medical/scientific research and 2) if subjects are subjected to procedures or are required to follow rules of behavior. Because this study can be considered a methodological study rather than a study designed to answer a question about disease (etiology, concomitants, diagnosis, prevention, outcome, or treatment), it did not meet both of these criteria and was therefore not submitted to an independent medical ethics review board. Written informed consent was obtained from the subjects.

Statistical analyses.

When data collection was complete, data were downloaded to a personal computer and processed using the ActiLife GT1M 2.2.3 software program (GT1M; ActiGraph). Descriptive statistics were used to characterize the sample. Differences in the mean accelerometer counts between activity types were tested using univariate ANOVA. Post hoc tests for all pairs of physical activity were performed using a Bonferroni correction. Between-site (i.e., hip vs ankle) comparisons were made using paired-sample t-tests. Values were considered statistically significant when the two-sided P value was lower than 0.05.

To classify the activity type, three ANN models were developed: a model based on data from an accelerometer worn on the hip (model 1), a model based on data from an accelerometer worn on the ankle (model 2), and a combined model based on data from accelerometers worn on both the hip and the ankle (model 3). ANN models provide a flexible non-linear extension of multiple logistic regression, consisting of a regression function with a set of predictors or input variables, a single hidden layer with several hidden units, and one output variable with several categories. Figure 1 shows a feed-forward ANN with five hidden units (14). For the models developed, the input variables were features of the accelerometer signal. To select suitable signal features, those used by Rothney et al. (15) and Staudenmayer et al. (17) were studied. A total of 16 signal characteristics were computed during 10 s of accelerometer data. The correlations between all features were analyzed to eliminate redundant information (15). Finally, the following accelerometer signal characteristics were selected for further analysis: 10th, 25th, 75th, and 90th percentiles, absolute deviation, coefficient of variability, and lag-one autocorrelation. The hidden units re-present weighted combinations of the input variables. Weights are represented by Wij. The categories of the output variable were K = 5 types of physical activity to be classified (i.e., sitting, standing, using the stairs, walking, and cycling). In a next step, K = 9 activities were classified (i.e., sitting, standing, going up the stairs, going down the stairs, walking indoors, regular walking outdoors, brisk walking outdoors, regular cycling, and brisk cycling). The accuracy of the three models was evaluated by leave-one-subject-out cross-validation (19). In this method, a set of n − 1 subjects is used as a training set, and the subject left is used as a testing set. Because feed-forward ANN models with a single hidden layer, five hidden units, and weight decay equal to 0.01 showed the highest classification accuracy, the performance of these models is presented. Increasing the number of hidden units or decreasing the weight decay did not improve the fit of the model.

FIGURE 1-Feed-f
FIGURE 1-Feed-f:
orward neural network model forK = 5 activities. The input variables represent the characteristics of the acceleration signal: p10=10th percentile, p25 = 25th percentile, p75 = 75th percentile, p90 = 90th percentile, a = absolute deviation, c = coefficient of variability, and l =lag-one autocorrelation; the hidden units are weighted combinations of the input variables; in the output, each K represents a physical activity.

All descriptive statistical analyses were performed using SPSS 14.0 (SPSS, Inc., Chicago, IL). The classification models were developed with the function nnet (19) in the software package R version 2.8.0 (R Development Core Team, 2008). Both R and nnet are freely available.


General results.

Figure 2 shows the data of four subjects from accelerometers worn on the hip (lowest line) and the ankle (highest line). Although there was a significant variation in accelerometer output between subjects and between sites, on average, ankle accelerometer counts per second were significantly higher than hip accelerometer counts per second (T = 303.968, P < 0.001). However, the extent of the difference varied according to the type of activity (Fig. 3). The mean difference between hip and ankle accelerometer outputs was highest for regular cycling (T = 493.290, P < 0.001) and lowest for sitting (T = 11.300, P < 0.001). When comparing single-sensor accelerometer data, the univariate ANOVA showed that there were significant differences in mean counts per second between all activities, with the exception of sitting and standing.

Hip and ankle accelerometer outputs (counts per second) for four subjects. Hip counts per second (lower line) and ankle counts per second (higher line). The plots are divided into five regions with solid vertical lines. Each region (R) represents an activity (R1 = walking, R2 = cycling, R3 = using the stairs, R4 = standing still, and R5 = sitting). No distinction was made between two self-paced speeds for the same activity.
Hip and ankle accelerometer outputs for nine activities (mean ± SD).

Activity classification.

Table 2 reports the sensitivity of the cross-validated results for the three ANN models in terms of correctly classifying five or nine activity types, respectively. Whereas the ANN model based on hip accelerometer data (model 1) correctly classified the five activities 80.4% of the time, the model based on ankle accelerometer data (model 2) attained a percentage of 77.7%. Finally, the combined model based on both hip and ankle accelerometer data (model 3) achieved the best performance (83.0%). A comparison of both single-sensor models shows that model 1 produced a better classification of the activities cycling, climbing stairs, and sitting, whereas model 2 was better able to correctly classify the activities walking and standing still.

Percentage of correctly classified activity types by ANN model.

The accuracy of the three models significantly decreased when a distinction was made between two self-paced speeds for the same activity (i.e., regular vs brisk walking or cycling) and between going up and going down the stairs. When this was done, model 1 correctly classified 60.3% of the activities, model 2 correctly classified 64.2%, and model 3 correctly classified 69.1%.

To evaluate the classification errors of the models in more detail, a contingency table representing the relationship between the observed and the predicted physical activities was built with the cross-validated results of the models classifying nine activity types. Table 3 shows that the highest percentage of misclassification errors occurred for allocation to the activities standing still and sitting. None of the three models discriminated between these activities; they often misclassified standing still as sitting. Another physical activity with a high percentage of misclassification was going up and going down the stairs. Furthermore, all models often misclassified brisk walking or cycling as regular walking or cycling.

Cross-validation results for the classification of nine physical activities of model 1 (hip), model 2 (ankle), and model 3 (hip and ankle) in percentages.

Finally, it was investigated whether the inclusion of demographic input variables (body height and weight, sex, and age) improved the fit of the models. The sensitivity of the models classifying the nine activities did not improve. In fact, the percentage of correctly classified activity types decreased from 60.3% to 59.8% for model 1, from 64.2% to 63.8% for model 2, and from 69.1% to 68.4% for model 3.


This study developed, compared, and evaluated relatively simple ANN models for the purpose of classifying types of physical activity in adults based on data from the hip accelerometer, ankle accelerometer, or both. Our results showed that all three models performed well (>80% correctly classified) when classifying walking, cycling, and sitting. However, the models performed worse when classifying using the stairs and standing still and when discriminating between two self-paced speeds of walking and cycling. The large variation between and within subjects as well as the leveling off effect of accelerometers at high speeds might have led to the misclassification of brisk walking and cycling as regular walking and cycling (4). One subject's self-selected "brisk" pace may have been slower than another subject's "regular" pace. The misclassification errors between standing still and sitting may have been caused by the short duration of standing still in our protocol (i.e., 30 s). Although, in most studies, accelerometers are worn on the hip, our results suggest that, to classify activity type, placement around the ankle or dual placement should be considered. The percentage of correctly classified activity types of the model based on both sensors was between 3% and 9% higher than the accuracy of the models based on single-sensor accelerometer data. In addition, the combined model was better able to discriminate between the same type of activities performed at different speeds (i.e., regular vs brisk walking or cycling) than the models based on single-sensor accelerometer data.

This study can be seen as a continuation of the work of Pober et al. (11) and Staudenmayer et al. (17), in which similar physical activities were classified using ANN models. Compared with the study of Pober et al., the addition of activities such as cycling and using the stairs in our study is a step toward the more accurate measurement of physical activity and energy expenditure. Moreover, whereas the study of Pober et al. was limited to laboratory activities (e.g., walking on a treadmill, simulated computer work), our study proved that pattern recognition also performs well for controlled free-living activities. As suggested by Pober et al. (11), we incorporated demographic input variables into the model to enhance predictive accuracy. However, our results suggest that adding these variables reduces predictive accuracy rather than increasing it. In the study of Staudenmayer et al. (17), a similar neural network model was used to classify free-living activities, as in our study. It used a more complex model with 25 hidden units rather than the five hidden units used in our study. Furthermore, they classified groups of activities rather than concrete activities. In this study, the same signal characteristics were used as in the study of Staundenmayer et al. However, the performance of our model was much inferior to theirs because of the categories of the output variable. Fitting their model with 25 hidden units to our data resulted in a percentage of correctly classified activities that is approximately 3% lower than was the case with the five hidden units in this study. The poorer performance of our models can therefore be explained by the selection of the physical activities in our study.

To our knowledge, our study and the two studies mentioned are among the few studies that used a commercially available uniaxial accelerometer for activity classification with a low sampling rate (1 Hz). Other studies have used biaxial or triaxial accelerometers (2,8-10,15) with higher raw sampling rates of 15-45 Hz for either activity classification (i.e., using the stairs, falling, walking, and postural transitions) or energy expenditure estimation.

In conclusion, relatively simple ANN models can correctly classify the type, but not the speed, of physical activities in adults based on accelerometer data. Future studies should determine whether the accuracy of the ANN models can be improved by including other accelerometer signal characteristics in the models, such as characteristics that mark the transition between activities or characteristics representing the cyclic nature of certain types of activity (e.g., cycling). For these analyses, raw accelerometer data (>20 Hz) rather than filtered accelerometer data (1 Hz) may be needed. Pattern recognition-based models may also improve by using data recorded during a stationary state for each activity and selecting data from 5-10 s after the starting time to 5-10 s before the finishing time (3). Furthermore, adding data from other sensors such as HR monitors, global positioning system, and inclinometers may also improve the accuracy of the models, as well as using data from accelerometers with multiple axes instead of one axis. Next, this study examined five free-living activities. It would be interesting to assess whether other free-living activities, such as household activities, gardening, and different sports, can also be classified using ANN models, as well as to distinguish between periods of sedentary activities, periods of sleeping, and periods when the accelerometer is not worn. In addition, we recommend examining whether ANN models can improve the accuracy of pattern recognition in children and elderly.

This study was funded by the Dutch Ministry of Health, Welfare, and Sport.

There are no conflicts of interest.

The authors thank Ariette van Hespen and Vera Slootweg for data collection.

The results of the present study do not constitute endorsement by the American College of Sports Medicine.


1. Armstrong N, Welsman JR. The physical activity patterns of European youth with reference to methods of assessment. Sports Med. 2006;36(12):1067-86.
2. Bonomi AG, Plasqui G, Goris AH, Westerterp KR. Improving assessment of daily energy expenditure by identifying types of physical activity with a single accelerometer. J Appl Physiol. 2009;107(3):655-61.
3. Bonomi AG, Goris AH, Yin B, Westerterp KR. Detection of type, duration, and intensity of physical activity using an accelerometer. Med Sci Sports Exerc. 2009;41(9):1770-7.
4. Brage S, Wedderkopp N, Franks PW, Andersen LB, Froberg K. Reexamination of validity and reliability of the CSA monitor in walking and running. Med Sci Sports Exerc. 2003;35(8):1447-54.
5. de Vries SI, van Hirtum WJEM, Bakker I, Hopman-Rock M, Hirasing RA, van Mechelen W. Validity and reproducibility of motion sensors in youth: a systematic update. Med Sci Sports Exerc. 2009;41(4):817-27.
6. Esliger DW, Copeland JL, Barnes JD, Tremblay MS. Standardizing and optimizing the use of accelerometer data for free-living physical activity monitoring. J Phys Act Health. 2005;2(3):366-83.
7. Levine JA, Baukol PA, Westerterp KR. Validation of the Tracmor triaxial accelerometer system for walking. Med Sci Sports Exerc. 2001;33(9):1593-7.
8. Mathie MJ, Celler BG, Lovell NH, Coster ACF. Classification of basic daily movements using a triaxial accelerometer. Med Biol Eng Comput. 2004;42:679-87.
9. Mathie MJ, Coster ACF, Lovell NH, Celler BG. Detection of daily physical activities using a triaxial accelerometer. Med Biol Eng Comput. 2003;41:296-301.
10. Muscillo R, Conforto S, Schmid M, Caselli P, D'Alessio T. Classification of motor activities through derivative dynamic time warping applied on accelerometer data. In: Proceedings of the 29th Annual International Conference of the IEEE EMBS; 2007 Aug 23-26. Lyon (France): Cité Internationale; 2007. p. 4930-3.
11. Pober DM, Staudenmayer J, Raphael C, Freedson PS. Development of novel techniques to classify physical activity mode using accelerometers. Med Sci Sports Exerc. 2006;38(9):1626-34.
12. Deleted in proof.
    13. Richardson MT, Ainsworth BE, Jacobs DR, Leon AS. Validation of the Stanford 7-day recall to assess habitual physical activity. Ann Epidemiol. 2001;11(2):145-53.
    14. Ripley BD. Pattern Recognition and Neural Networks. Cambridge (UK): Cambridge University Press; 1996. p. 6.
    15. Rothney MP, Neumann M, Beziat A, Chen KY. An artificial neural network model of energy expenditure using nonintegrated acceleration signals. J Appl Physiol. 2007;103(4):1419-27.
    16. Rowlands AV, Thomas PW, Eston RG, Topping R. Validation of the RT3 triaxial accelerometer for the assessment of physical activity. Med Sci Sports Exerc. 2004;36(3):518-24.
    17. 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. 2009;107(4):1300-7.
    18. Tudor-Locke CE, Myers AM. Challenges and opportunities for measuring physical activity in sedentary adults. Sports Med. 2001;31(2):91-100.
    19. Venables WN, Ripley BD. Modern Applied Statistics with S. New York (NY): Springer-Verlag; 2002. p. 7.
    20. Welk GJ. Introduction to physical activity research. In: Welk GJ, editor. Physical Activity Assessments for Health-Related Research. Champaign (IL): Human Kinetics; 2002. p. 3-18.
    21. Welk GJ, Schaben JA, Morrow JR Jr. Reliability of accelerometry-based activity monitors: a generalizability study. Med Sci Sports Exerc. 2004;36(9):1637-45.


    ©2011The American College of Sports Medicine