Reputation: 53
I have IMU data (accelerometer, magnetometer, and gyroscope) during a variety of exercises (squats, push-ups, sit-ups, burpees). These exercises are completed in a single 1D time series signal and I would like to use a machine learning classification method to identify the different exercises within the signal. I do not want to condense the signal into 0D peaks and build my features that way but rather keep the time domain intact. Below is a figure showing example data from the accelerometer that contains the four exercises.
My question therefore is - which method would be most effective at doing so? K-means clustering would be perfect in the 0D sense so is there a 1D equivalent?
Upvotes: 1
Views: 1284
Reputation: 6259
For time-series data the standard method is bag-of-frames, chopping it up into small chunks called frames. The frames can be overlapped and windowed or disjoint. Frame size is an important hyper-parameter and depends on task. Features like min,max,median,variance,RMS are calculated on each frame. To use variation over time in the classifier one uses lagged or delta features. Lagged features are values from the frames before. Delta features are computed as the difference of current frame to the previous one.
For classification you will need to label the segments of different activities. Note that for human-activity detection on accelerator data there are also tons of public datasets available, like UCI: Human Activity Recognition Using Smartphones
Upvotes: 0
Reputation: 1901
I think that rather than classification, you want to do clustering. Classification is putting data into predefined categories (usually based on some training data), whereas clustering is used to group parts of data into previously unknown classes. Here is a short table showing the difference between classification and clustering.
One thing you can do is chop the time series up into overlapping samples (perhaps 1000 timesteps each) and calculate some statistics for those (mean, variance, etc.). Then perform K-Means Clustering on the statistics you calculated.
After performing clustering, you could use the classes identified during clustering to create training data for a classifier.
Upvotes: 2