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.
Where:
explainers/subgroup-fairness.md, line ~157's usage comment: runningsubgroup_scan(df, "y", ["gender","race","age"], max_depth=2)onHealthcare Readmission/diabetic_data.csvis claimed to surface the gender x race = (Asian, Female) cell with a deviation of ~-0.036.The gap:
subgroup_scan()'s own defaultdeviation_threshold=0.05(line ~96) filters results toout["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 runningsubgroup_scanwith 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_thresholdenough 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.