Interval ratio removed criterion combination#283
Merged
Conversation
Also rewrite CappedMinCount to use find_rectangles. Co-authored-by: Gregor Lichtner <gregor.lichtner@med.uni-greifswald.de>
…tervals Also rewrite NoDataPreservingAnd to use find_rectangles
…tervals Also rewrite LeftDependentToggle to use find_rectangles
…tor windows Before this change, an indicator window which was partially within the population interval and did not satisfy the temporal count condition produced a "not applicable" result. With this change, such indicator windows produce a negative result. Also implement TemporalCount via find_rectangles and remove find_overlapping_windows.
This avoids sorting twice and some other work
The _replace method already returns a new instance.
…ed-criterion-combination
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #283 +/- ##
==========================================
- Coverage 85.24% 85.11% -0.13%
==========================================
Files 96 97 +1
Lines 6297 6370 +73
==========================================
+ Hits 5368 5422 +54
- Misses 929 948 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add the negative intervals in a single find_rectangles call instead of computing negative intervals and then merging.
Also implement the operators via find_rectangles and remove from the process module the functions count_intervals and filter_count_intervals.
f1c5638 to
c1e8c6e
Compare
c1e8c6e to
8ab56e3
Compare
Do not require a positive number of intervals of type POSITIVE if count_min is 0. Add a test case.
9cde5a9 to
0659747
Compare
The comparison of events with the same timestamp and the same "track" was too simplistic: for an open-and-close event pair for single (point-shaped) interval, the open event should go before the close event. however, for the close event from one interval and the open event from a different, adjacent interval, the close event should go before the open interval. With the new sorting in place, the processing of event clusters can restrict the "1 second lookahead" to open events (instead of all events). The mechanism is intended to detect adjacent intervals by possibly "pulling in" the open event of a following interval if that open event happens in the next second after the close event of the previous interval.
And handle empty inputs slightly better in rectangle_[pc]ython.find_rectangles.
486fd19 to
160a47b
Compare
5f1d4c0 to
701c2b3
Compare
2158579 to
70393e0
Compare
the intended behavior - which is :TemporalMinCount should return NEGATIVE (instead of NOT_APPLICABLE) if all inputs are NO_DATA) - can be achieved much simpler by treating NO_DATA in the data_intervals (in update_window_type) the same as NEGATIVE intervals.
565823f to
7d6a863
Compare
docs: add code comments
7d6a863 to
aaa89c3
Compare
…with PostgreSQL Remove microseconds from start and end datetimes to ensure consistent behavior across Python and PostgreSQL. Python uses floor when casting to int, while PostgreSQL may round, potentially causing off-by-one-second bugs. Added assertions to enforce the truncation.
da870f9 to
65e815c
Compare
This file contains hidden or 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
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.
No description provided.