Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infinite loop if support not specified #187

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

inakleinbottle
Copy link
Contributor

The esig interface exposed a bug in which not specifying the support would cause an infinite loop as the dyadic intervals over the unbounded interval [0, +inf) were enumerated in the case where no increments were provided to stream constructor. This is caused by the construct setting the unbounded interval as the default value, which is usually overwritten by either the additional arguments or is inferred from the timestamps during the construction process. Of course, both fail is the support is not provided and no data is provided. This is now fixed by setting the effective support to [0, 1).

Introduces three new tests to validate the equivariance property of signatures for tree-like paths. Ensures consistency between original paths and their pruned representations using `esig_stream2sig`. These additions strengthen coverage for stream behavior in edge cases.
Replaced right_unbounded interval creation with direct initialization of `effective_support`. Added fallback to `effective_support` when `md.support` is not provided, ensuring proper restriction behavior.
@inakleinbottle inakleinbottle merged commit 3e3564d into main Dec 16, 2024
3 checks passed
@inakleinbottle inakleinbottle deleted the fix-infinite-loop-if-support-not-specified branch December 16, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant