Fix switch/flip error rate calculations #112
Open
+28
−8
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.
The previous code counted a string of errors "0 1 1 1 0" as two flips, two switch errors, and one correct variant. For researchers who want to examine the relative rate of flip events and switch errors unrelated to flips, this is unhelpful.
Instead, I would argue this represents one flip event, three switch errors, two correct variants, and zero "pure switch errors" (ie isolated switch errors that are not associated with a flip error).
This code change calculates flip events, switch errors, pure switch errors, and correct variants. It also calculated how many flip errors occur consecutively (ie, more than two errors in sequence).
Do you agree that this system of tracking errors and flips makes sense? I plan on publishing soon with data calculated using this code, and your sign off on this fork would be of immense help.
Thanks,
Joe