DOI: 10.5281/zenodo.10996083
title: Features computed from physical exercises measurements

description:  The data represents time series features from an accelerometer and gyroscope extracted from Physical Exercise Measurements with Accelerometer and Gyroscope (zenodo.org). The data consists of 5 feature sets.

Description of feature sets:

1.     RQA features set

• "RR" - Recurrence rate• "DET" - Determinism, count recurrence points in diagonal lines of length >= lmin• "RATIO" - DET/RR• "AVG" - average length of diagonal lines of length >= lmin• "MAX" - maximal length of diagonal lines of length >= lmin• "DIV" - Divergence, 1/MAX• "LAM" - Laminarity, VLRP/TR• "TT" - Trapping time, average length of vertical lines of length >= lmin• "MAX_V" - maximal length of vertical lines of length >= lmin• "TR" - Total number of recurrence points• "DLRP" - Recurrence points on the diagonal lines of length of length >= lmin• "DLC" - Count of diagonal lines of length of length >= lmin• "VLRP" - Recurrence points on the vertical lines of length of length >= lmin• "VLC" - Count of vertical lines of length of length >= lmin

Was calculated by Chaos01 R package.

https://CRAN.R-project.org/package=Chaos01

The parameters were chosen so that the embedding will create a vector of one value of each axis of the accelerometer/gyroscope measurements. Therefore the used parameters were:




Function argument
Value


embedding dimension (dim)
3


embedding lag (lag)
time series length


Minimal length of recurrence line (lmin)
20




For Chaos01 we change eps argument and calculated it by following formula:

# Calculate eps for acc and gyro Chaos 01----

get_eps <- function(input_data, scale = 1) {

  # Calculate eps for acc and gyro

  eps_a <-

    purrr::map_dbl(input_data$data,

                   ~ .x |>

                     select(Ax, Ay, Az) |>

                                              as.matrix() |>

                                              as.vector() |>

                                               sd()) |>

                                               mean() * scale

  eps_g <-

    purrr::map_dbl(input_data$data,

                   ~ .x |>

                                             select(Gx, Gy, Gz) |> 

                                              as.matrix() 

                                             as.vector() |>

                                              sd()) |>

                                              mean() * scale

return(list(a = eps_a, g = eps_g))

}

"TREND" - Trend of the number of recurrent points depending on the distance to the main diagonal.

Was calculated by nonlinearTseries R package.

 https://CRAN.R-project.org/package=nonlinearTseries

 

All following feature sets was calculated by Python package

https://tsfresh.readthedocs.io/en/latest/index.html

 

The used dictionary is included in file named tsfresh_autocorr_spectral_features.py.

 

2.     Autocorrelation features set

#https://tsfresh.readthedocs.io/en/latest/api/tsfresh.feature_extraction.html#tsfresh.feature_extraction.feature_calculators.autocorrelation

#https://tsfresh.readthedocs.io/en/latest/api/tsfresh.feature_extraction.html#tsfresh.feature_extraction.feature_calculators.agg_autocorrelation

 

3.     Spectral features set

#https://tsfresh.readthedocs.io/en/latest/api/tsfresh.feature_extraction.html#tsfresh.feature_extraction.feature_calculators.fft_aggregated

#https://tsfresh.readthedocs.io/en/latest/api/tsfresh.feature_extraction.html#tsfresh.feature_extraction.feature_calculators.approximate_entropy

#https://tsfresh.readthedocs.io/en/latest/api/tsfresh.feature_extraction.html#tsfresh.feature_extraction.feature_calculators.fft_coefficient

#https://tsfresh.readthedocs.io/en/latest/api/tsfresh.feature_extraction.html#tsfresh.feature_extraction.feature_calculators.fourier_entropy

#https://tsfresh.readthedocs.io/en/latest/api/tsfresh.feature_extraction.html#tsfresh.feature_extraction.feature_calculators.spkt_welch_density

#https://tsfresh.readthedocs.io/en/latest/api/tsfresh.feature_extraction.html#tsfresh.feature_extraction.feature_calculators.ar_coefficient

 

4.     Mix RQA/Spectral/Autocorrelation features set

 

5.     Tsfresh all features set

#https://tsfresh.readthedocs.io/en/latest/api/tsfresh.feature_extraction.html

 

Versions of the software:

Python (version 3.8.10) 

tsfresh = 0.20.2

R (version 4.3.2) 

Chaos01 = Version 1.2.1 

nonlinearTseries = 0.3.0