benfulcher / hctsa

Highly comparative time-series analysis
https://time-series-features.gitbook.io/hctsa-manual/
Other
734 stars 315 forks source link

Option to saturate rather than remove points #34

Closed brendanjohnharris closed 5 years ago

brendanjohnharris commented 5 years ago

An extra argument 'removeOrSaturate' controls whether points are removed completely (and the left-overs concatenated) or their values are saturated (replaced with a threshold value).

I haven't added saturation for the 'random' (that wouldn't make sense?) or 'absclose' (maybe to the nearest threshold?) remove methods, but I can if there's a way you'd like those to work.

Also, the 'ac1' features in DN_RemovePoints look like they might be using acf(0) (so 'ac1rat' always gives 1, and 'ac1diff' 0); if that's an issue then maybe on the fifth last line (in 'SUB_acf'): acf(i) = CO_AutoCorr(x,i-1,'Fourier'); could be:\ acf(i) = CO_AutoCorr(x,i,'Fourier');


Brendan





E.g.

DN_RemovePoints(x, 'absfar', 0.4, 1) image