I need a statistic or metric to obtain which vector has the highest changes between its values, I mean, I would like to get vector b, because it has different number contiguous to each other one. They don't have just binary numbers, maybe between 0-255 range:
a = [0,0,0,0,0,1,1,1,1,1]
b = [1,0,1,0,1,0,1,0,1,0]
As you can see, both vector has the same number of values and range, but different sequence. I had apply variance and coefficient of variation, but they give the same results.
print 'Var:', np.var(a),'CV:', np.std(a)/np.mean(a)
print 'Var:', np.var(b),'CV:', np.std(b)/np.mean(b)
Var: 0.25 CV: 1.0
Var: 0.25 CV: 1.0
What other statistic or measure I can try? Any other suggestion?