find_steps algorithm: handle 2 edge cases where jumps were missed#5
Open
ehoppmann wants to merge 4 commits intothomasbkahn:masterfrom
Open
find_steps algorithm: handle 2 edge cases where jumps were missed#5ehoppmann wants to merge 4 commits intothomasbkahn:masterfrom
ehoppmann wants to merge 4 commits intothomasbkahn:masterfrom
Conversation
Edge case addressed: where data skips from being greater than the threshold on one side (positive or negative) to the opposite side without any transition points. Addressed by manually inserting -1 and 1 values into ap_diff so that these transitions will be accounted for. Added test for this case.
Include dni in range from upi to dni (previously stopped at dni - 1)
Handles cases where filtered data remains above threshold while multiple step changes occur by checking number of zero crossing of first derivative of filtered data and iterating through regions between zero crossings
* Address edge case where data can skip from being > threshold with one sign to the opposite sign without any transition points * Address edge case where ap_dif can become inconsistent during correction from skipping from pos > threshold to neg > threshold if there are two overlapping jumps * Address edge case where first threshold crossing is a down instead of an up * Handle cases where there are multiple jumps while filtered data > threshold (on the same side) by examining first derivative zero crossings
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.
Edge cases addressed:
Created test methods to verify that jumps are identified in both of these cases.