Skip to content

subgroup-fairness.md's usage example claims a result its own function's default threshold would exclude #645

Description

@yakew7

Where: explainers/subgroup-fairness.md, line ~157's usage comment: running subgroup_scan(df, "y", ["gender","race","age"], max_depth=2) on Healthcare Readmission/diabetic_data.csv is claimed to surface the gender x race = (Asian, Female) cell with a deviation of ~-0.036.

The gap: subgroup_scan()'s own default deviation_threshold=0.05 (line ~96) filters results to out["deviation"].abs() >= deviation_threshold (line ~142). The real deviation for that cell is -0.0361 (n=318) - below 0.05, so the function's own default filtering excludes it. Actually running subgroup_scan with the exact defaults shown returns 9 flagged rows, none of them the (Asian, Female) cell the prose describes.

Fix direction: either lower the example call's deviation_threshold enough to actually surface this cell (and say so explicitly), or pick a different cell from the real 9-row output that the default threshold does surface, and update the usage comment to match.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions