I am trying to model a process in which each datapoint is generated sequentially, so the current observation depends on the last one. Some example data could look like,
A = [4.5, 5, 6, 5.5, 8, 0, 0, 0, 0, 3, 2.3, 4.5]
B = [4.5, 5, 6, 5.5, 8, 0, 0, 0, 0, 0, 0, 0]
C = [0, 0, , 0, 0, 0, 0, 0, 0, 2.9, 2.2, 4.4]
the goal is to identify which objects have very similar observations. In the above case, A and B would be identified as being very similar, and A and C likewise.
My go-to solution was to fit a Gaussian Mixture Model, however the simple model does not take into account that the current observation depends on the last. This is also very evident from preliminary results, in which the following kind of combination is identified as being very similar,
B = [4.5, 5, 6, 5.5, 8, 0, 0, 0, 0, 0, 0, 0]
D = [0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 3, 2]
and that should not be the case. And yes, I am aware that "being very similar" is a very vague definition, but I am asking this question mostly to get some ideas on how to go about the problem.
Is a mixture model even appropriate for this kind of analysis? If not, what are some alternatives? I think that it is really important any model takes into account the sequential nature of the data. Also,
If I missed any obvious previous posts on SE I apologise, I am still struggling a bit with the terminology and might have missed an obvious search term.
Cheers.
Update: Still trying to solve this problem. After some discussions on the Stan mailing list, I arrived at a model,
$$p(y_{2:T} | \theta, \mu, \sigma, beta) = \prod_{t \in 2:T} \sum_{k \in 1:K} \theta(k) \cdot \mathcal{N}\left(y(t) | \mu + \beta(k) \cdot y_{t-1}, \sigma\right) $$
So it has an autoregressive property. I'm not sure how well this model captures the signal, though. Early tests does not show very good results, so I'm not sure if the idea if worth following.
Another thought I got would be to calculate a similarity, or somehow encode the signal, so I can use a clustering algorithm instead. Any tips or suggestions on this?