I have some time series data I'm working with, where each at each step I have a sequence. For example I could have a bunch of graphs looking like the left figure, followed by an anomalous piece of data looking like the right figure.
I want to construct an online method where I'm able to say the anomalous graph is clearly from a different distribution or similar approach which only uses the recent data, say the previous 20 graphs. Is there a nice way to do this or some nice literature for this type of problem? I've tried some optimal transport methods to compare distributions and simple stats, but I want something that is fairly robust. Any comments welcome!
The anomalies can be anything - for instance the right-hand image is showing jagged behaviour rather than smooth, but generally the anomalies are not visually subtle, the distributions will look a lot different.