1

I am working on a motion classification task using accelerometer data collected at 25Hz during different exercises. The goal is to classify movements such as:

Pull-ups Push-ups Dips Each batch of data consists of 50samples (2 seconds), where each sample contains three acceleration values (X, Y, Z axes). The raw data format looks like this (so one batch of 2 seconds):

X-acc Y-acc Z-acc

0.12 -0.53 0.53 0.32 -0.13 0.53 0.12 -0.53 0.76 0.87 -0.43 0.22 . . (total 50 rows)

This batch of 50 could for example represent dips.

I initially considered feeding the raw 50×3 matrix directly into fit() and predict() but struggling to understand if this really is the correct approach.

Can I train a scikit-learn model directly on raw 50×3 data?

Gripen
  • 111
  • 1

1 Answers1

1

Instead of flattening with sciki-learn model, you might try more specialized sciki-learn compatible open-source library sktime for your motion classification task based on time series training data, which allows you to directly input your 50×3 accelerometer matrices as pandas DataFrame where each cell is a pandas Series, preserving the temporal and multivariate relationships inherent in your data. This approach is advantageous because it maintains the sequential nature of the data, which is crucial for accurately capturing the dynamics of different movements.

sktime offers classifiers that natively handle multivariate time series data such as the TimeSeriesForestClassifier for your purpose.

cinch
  • 11,000
  • 3
  • 8
  • 17