Skip to content

Count one false positive for a run inside the grouping window - #353

Open
SashaMIT wants to merge 1 commit into
dscripka:mainfrom
SashaMIT:codered-false-positives
Open

SashaMIT wants to merge 1 commit into
dscripka:mainfrom
SashaMIT:codered-false-positives

Conversation

@SashaMIT

Copy link
Copy Markdown

get_false_positives of [0, 1, 1, 1, 1] came back as 4. [1, 1, 1] came back as 3. After one frame above the threshold, the next 50 frames are supposed to be ignored, so each of those is one false positive. The clear length was len(transitions) - index, which is 0 or negative for a single run, so the extra frames were counted. A hit on the last frame, [0, 1], raised IndexError. A second hit 50 frames after the ignored window still counts: [1] plus 50 zeros plus [1] is 2. A score list that never crosses the threshold is 0.

Before the change, [0, 1, 1, 1, 1] was 4 and [0, 1] raised IndexError. After the change, python tests/test_metrics.py passes, 2 tests.

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