time series comparison metric

I have two sets of time series (attached in text) and i want to compare them in a quantitative way.
My interest is in showing that the second series is more smooth than the first because
that is what it looks like visually. I am looking for a metric that shows that smoothness.

4 Commenti

Rik
Rik il 10 Dic 2018
You could define smoothness by looking at the magnitude of higher frequency changes.
So what code did you try already? What kind of metric were you thinking of? What type of comparison is normal in your field?
Angela
Angela il 10 Dic 2018
What do you mean by magnitude of higher frequency changes? FFT or something else?
I thought of using the variance but that does not seem appropriate because a straight line can have a big variance and still be smooth. I do not know any other metric.
Rik
Rik il 11 Dic 2018
I was indeed thinking of a Fourier transform, but Chad's solution is probably better, as it is easier to explain.
Angela
Angela il 11 Dic 2018
Thank you for your answer.

Accedi per commentare.

 Risposta accettata

Chad Greene
Chad Greene il 10 Dic 2018
The simplest way is just to compare the standard deviations of each signal:
st1 = std(d1);
st2 = std(d2);
Although that approach might be dominated by low frequency variability. So you could go one step fancier just analyze the residuals after removing the moving mean. Pick some window for the moving mean (I'm using 500 below) and then compare the standard deviations:
d1_res = d1 - movmean(d1,500);
d2_res = d2 - movmean(d2,500);
std(d1_res)
std(d2_res)

1 Commento

Angela
Angela il 11 Dic 2018
Thank you. It worked. I got a nice reduction in the value std(d2_res).

Accedi per commentare.

Più risposte (0)

Richiesto:

il 10 Dic 2018

Commentato:

il 11 Dic 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by