Comments (2)
Thanks for the detailed explanation Sean. I didn't have the time to look deeper in paper's math or code. As a user, I think both options (warning or ValueError) are fine as long as I am given notice of this limitation. From software engineering angle, ValueError may be a better option though. If this wasn't faced during exploratary/development phase, warning may get lost in a complex program utilizing STUMPY where m is computed dynamically. Feel free to close the issue whenever you like.
from stumpy.
@pembeci Thanks for pointing this out and I can confirm this finding.
It looks like the issue comes up when the z-normalization happens. In the case of m=1
, z-normalization doesn't make any sense since the standard deviation for an array with only a single element will always be zero and, therefore, you get a divide by zero situation. So, m
should never be equal to 1
.
In the case of m=2
, the mean and standard deviation for any given subsequence are identical and so the z-normalization for any sequence will either be [-1., 1.]
or [1., -1.]
. Thus, the z-normalized Euclidean distance will be (very likely) zero between any subsequence and its nearest neighbor (assuming that the time series is large enough to contain both scenarios).
In short, this isn't so much a fault of STUMPY but of the ambiguity of what z-normalization means for toy examples where m <= 2
. Values of m <= 2
must be avoided. The situation is fine when the m >= 3
or when m
and the length of the array gets bigger and bigger.
As a user, would you mind providing some feedback as to how you might expect these scenarios to be handled?
In the simplest case, we can add a check and always enforce that m >= 3
and print a logging warning to let the user know that the value of m
must be greater than or equal to 3. On second thought, it probably makes more sense to raise a ValueError
. I'd love to hear your thoughts.
from stumpy.
Related Issues (20)
- Typo in `core._get_ranges`
- Problem importing stumpy HOT 6
- Request: stumpi equivalent for multivariate case HOT 3
- Ignore_trivial does not work as expected HOT 7
- Improve `ignore_trivial` docstring HOT 2
- Minor typo in `/docs /Tutorial_Shapelet_Discovery.ipynb` HOT 1
- Speeding up the computation of sliding dot product with fft HOT 90
- Computing matrix profile while considering a custom transformation for subsequences HOT 10
- Trying to use AB Join to compare two well log curves called Gamma Ray (GR) and pink major trends with similar magnitudes HOT 2
- Some issues in Tutorial_Multidimensional_Motif_Discovery and MDL HOT 6
- Ts_subseq_isconstant parameter in ostinato algorithm HOT 2
- Faster Non-normalized Matrix Profiles
- `setuptools` Removed From Python 3.12
- Remove `pkg_resources` Dependency HOT 1
- Numba Python Version Compatibility Update
- Numba Python Version Compatibility Update
- Numba Python Version Compatibility Update
- Incorrect MIN Python Version in README HOT 1
- Bump Supported Python Version to 3.12
- Improving Multi-processor Performance HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stumpy.