Skip to content

Count duplicate list matches only once in membership metrics - #1973

Open
AryanRG wants to merge 1 commit into
evidentlyai:mainfrom
AryanRG:fix-list-value-count-duplicates
Open

AryanRG wants to merge 1 commit into
evidentlyai:mainfrom
AryanRG:fix-list-value-count-duplicates

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 22, 2026

Copy link
Copy Markdown

InListValueCount and OutListValueCount count a matching row more than once when values contains duplicates. For data ["NY", "NY", "LA"] and values ["NY", "NY"], the in-list count becomes 4 instead of 2, and the out-list count becomes negative.

Resolve labels using pandas, then count each matched source position once. This preserves the existing boolean/numeric lookup behavior. Added coverage for repeated values, label order, missing values and reference data.

Affected metric/report tests and Ruff checks pass.

This branch has not been deployed

No deployments
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