Hi,
I need to understand when my dataset is changing (I am working with TV filters), and to do it I have done a code ,which is working, to give me a logical 1
if there is a variation from step k to k+1 by means of Kullbach Lieber divergence or a 0. The problem is that I have a kind of ripple in my data so the output vector is
like: [0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 0 0 0].
Now I would like to write a code to find the longest stripe of ones and the indexes (which is when I have the real variation), is there any path that I could follow which I am missing?
So, in the picture in red there is my data set and in cyan and blue a cspline and ischange approximation, since they are not working as expected I would like to cluster the set into steady state and varying to later apply a robust average algorithm (the whole code must be lean, so I must reduce everything to the lowest possible number of values).
I hope to have been clear enough.
Thanks you for your time 🙂
Best Answer