-
Notifications
You must be signed in to change notification settings - Fork 59
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
test: Streak lengths #100
Merged
topher-lo
merged 5 commits into
functime-org:main
from
TomBurdge:test-streak-length-stats
Oct 27, 2023
Merged
test: Streak lengths #100
topher-lo
merged 5 commits into
functime-org:main
from
TomBurdge:test-streak-length-stats
Oct 27, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prior to this,there is an issue where the series/expression is bi-modal. Which modal value appears first is indeterminate. As a result, results are not idempotent. This fix sorts to generate idempotent mode results. Have inferred the intended behaviour as taking the smallest modal value.
if input series: dictionary with Nones and 0 for min empty df
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
abstractqqq
reviewed
Oct 25, 2023
@@ -1668,25 +1688,25 @@ def streak_length_stats(x: TIME_SERIES_T, above: bool, threshold: float) -> MAP_ | |||
y = y.filter(y.struct.field("values")).struct.field("lengths") | |||
if isinstance(x, pl.Series): | |||
return { | |||
"min": y.min(), | |||
"min": y.min() or 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know Python supports this lol 👍
abstractqqq
approved these changes
Oct 25, 2023
topher-lo
approved these changes
Oct 27, 2023
topher-lo
pushed a commit
that referenced
this pull request
Dec 19, 2023
Co-authored-by: TQQQ <72534736+abstractqqq@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Written tests for the streak length stats.
Following my questions to @abstractqqq in the Unit Test Tracker I have implemented tests and small changes to streak length stats.
I made some small changes to streaks function: