Adjust max distance for stumpy match function

23 Views Asked by At

I use python stumpy to extract subsequences from a timeseries. For a pattern Q and a timeseries T, I use the function stumpy.match https://stumpy.readthedocs.io/en/latest/api.html#stumpy.match

Now related to the max distance allowed: by default it use:

np.nanmax([np.nanmean(D) - 2 * np.nanstd(D), np.nanmin(D)])

Somehow this refer to values within 2 standard deviations. I want to change this to look up to 3 standard deviations; It's unclear for me how can I do this - to replace with a function with a single parameter D, and this function to return something like this: np.nanmax([np.nanmean(D) - 3 * np.nanstd(D), np.nanmin(D)]). Also is not clear for me what D should be (I mean it has the length n - m + 1, assume n is whole timeseries len, m is window size), so I could be the whole timeseries without the given query pattern Q or what?

0

There are 0 best solutions below