I am working on a problem where I have a multiple time series, each with a size of a 100 steps, each being described by a 8 variables variables. I want to identify "states" within each time series, where a state would reflect some cluster that is learned from the spatiotemporal pattern of values of the 8 variables.
So so far most options point me towards dynamic time warping DTW
, but I am not really interested in grouping the full time series (e.g. timeseries 1, time-series 2, etc each of 100 steps* 8 variables, into a group of similar vs dissimilar timeseries), which is what approaches like dtw seem to do in my understanding.
What I really want is to find states within each timeseries. say within timeseries 1 (containing 100 steps and 8 variables), I want to find pieces of time that reflect different clusters, they might have different durations, shapes, etc.
What I have tried so far is to use k-means
clustering for each timeseries, where I use the 8 variables as features to the kmean algorithm, and for a single timeseries I would get something like figure 1 when k = 3
the lines represent the 8 variables and the shaded colors represent the k-means clusters I identified. I would then do this for all timeseries. While this seems to work for this case, I am worried about its appropriateness, specifically, because the clusters will be biased toward the means of the variables, and the kmeans doesn't really exploit the temporal structure explicitly.
for a context, these data represent body movement trajectories as defined by the magnitude and speed of a number of sensors. I want to find certain states like movement initiation, sustainment, etc, which I think can be captured by clusters that represent these states.
Any suggestions of whether this is okay, or other sensible approaches, that I could implement in R
would be greatly appreciated.