Unsupervised clustering algorithm for unevenly spaced sequential categorical data?
One method you can use for clustering this type of time-dependent data is a Hidden Markov Model (HMM). HMMs can model the dependencies between the positions and the time steps, allowing for the clustering of similar patterns in the data. Another alternative is a Gaussian Mixture Model (GMM), where you can model the position and time values as multivariate Gaussian distributions, and use Expectation-Maximization (EM) to estimate the parameters of the distributions. Both HMMs and GMMs have been used in various time-series analysis and clustering tasks, and both have Python implementations available through popular libraries such as scikit-learn and hmmlearn.
It is recommended to try out both algorithms and compare the results to see which one performs better for your specific dataset. You can also experiment with different features and preprocessing techniques, such as interpolation or downsampling, to see if it improves the performance of the clustering algorithm.
I am looking for a technique/method/algorithm which will be able to handle time-dependent data (each sample has 20 time steps, but for the most part they occur unevenly between samples, i.e., one sample may have a value at 0.4 seconds while another sample might not). The value itself of the time step corresponds to a categorical position on the body (ranging from 1-20) where the muscle activiation occured.
So the data resembles, (time, position):
(0.1, 16)
(0.16, 1)
(0.25, 13)
(0.26, 12)
(0.27, 1)
(0.4, 4)
Is there a clustering algorithm which will be able to work for this type of data. I would like the algorithm to consider the time dependency of the data. Dynamic time warping is not suitable for unevenly spaced time series data and I am not sure how it would handle the sparse categorical data I have, e.g. a given position will only appear once per sample.
Any suggestions or help is appreciated.
I have looked through lots of different models, but none so far work with their given assumptions. Hidden markov models are out of the question (need stochastic time steps), DTW does not work for unevenly spaced time steps, and techniques like Lomb-Scargle do not work for categorical data especially not-periodic categorical data. Fast-fourier transform is also off the table.