Stumpy: Option to get plain distance rather than z-normalized version

271 Views Asked by At

I am carrying out a task where it would be more favourable to compute a regular distance than a z-normalized distance which stumpy.stump computes. Is there any way of doing this with this stumpy?

1

There are 1 best solutions below

0
On
Yes, in fact this is already available in `stumpy`. All non-normalized Euclidean distance (i.e., without z-normalization) functions are prefaced with some variation of `aamp` (based on this [research paper][1]). Additionally, the full STUMPY API is [here][2].

For non-normalized Euclidean distance, simply replace your stumpy.stump function call with:

import stumpy

mp = stumpy.aamp(T, m=50)

Finally, for faster responses to your STUMPY questions, I strongly recommend that you post them directly to the STUMPY Github issues since it will reach the developer(s) a lot faster and the community is super helpful!

Update

As of STUMPY v1.8.0, we've simplified our API and you can now set the normalize=False flag when you want non-normalized distances (i.e., without z-normalization):

import stumpy

mp = stumpy.stump(T, m=50, normalize=False)  # Gives the same output as above