feat(concordance): add minor error (mE) metric#111
Open
efosternyarko wants to merge 1 commit into
Open
Conversation
Adds mE (minor error) to concordance() and concordance_from_tables() as defined by Wanger et al. (1999) / ISO 20776-2: proportion of intermediate (I) isolates genotypically predicted as resistant. Computed as count(I=1 & pred=1) / count(I=1) for the R outcome when an I column is present; NA for NWT (no intermediate ECOFF category). Closes AMRverse#109
Collaborator
Author
|
@katholt this is ready for your review! |
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.
Summary
mE(minor error) toconcordance()andconcordance_from_tables(), as defined by Wanger et al. (1999) / ISO 20776-2count(I=1 & pred=1) / count(I=1)NAfor the NWT outcome (no intermediate ECOFF category) and when noIcolumn is presentconcordance_from_tables()now encodes a binaryIcolumn from the observed SIR calls so mE flows through the per-drugconcordance()call automatically, capturing true=I, predicted=R discordancesprint.amr_concordance()conditionally displaysmEonly when non-NACloses #109
Test plan
concordance()with a binary matrix containing anIcolumn: checkmEis computed and printed under the R outcomeconcordance()for NWT outcome: checkmEisNAand not printedconcordance()with noIcolumn: checkmEisNAconcordance_from_tables(): checkmEappears inmetricsfor drugs with intermediate isolates