Journal for the Measurement of Physical Behaviour | 2021

Converting Raw Accelerometer Data to Activity Counts Using Open-Source Code: Implementing a MATLAB Code in Python and R, and Comparing the Results to ActiLife

 
 
 
 
 
 

Abstract


Background: Closed-source software for processing and analyzing accelerometer data provides little to no information about the algorithms used to transform acceleration data into physical activity indicators. Recently, an algorithm was developed in MATLAB that replicates the frequently used proprietary ActiLife activity counts. The aim of this software profile was (a)\xa0to translate the MATLAB algorithm into R and Python and (b)\xa0to test the accuracy of the algorithm on free-living data. Methods: As part of the INTErventions, Research, and Action in Cities Team, data were collected from 86 participants in Victoria (Canada). The participants were asked to wear an integrated global positioning system and accelerometer sensor (SenseDoc) for 10\xa0days on the right hip. Raw accelerometer data were processed in ActiLife, MATLAB, R, and Python and compared using Pearson correlation, interclass correlation, and visual inspection. Results: Data were collected for a combined 749 valid days (>10\xa0hr wear time). MATLAB, Python, and R counts per minute on the vertical axis had Pearson correlations with the ActiLife counts per minute of .998, .998, and .999, respectively. All three algorithms overestimated ActiLife counts per minute, some by up to 2.8%. Conclusions: A MATLAB algorithm for deriving ActiLife counts was implemented in R and Python. The different implementations provide similar results to ActiLife counts produced in the closed source software and can, for all practical purposes, be used interchangeably. This opens up possibilities to comparing studies using similar accelerometers from different suppliers, and to using free, open-source software.

Volume None
Pages None
DOI 10.1123/jmpb.2019-0063
Language English
Journal Journal for the Measurement of Physical Behaviour

Full Text