Fairness Extraction
To evaluate fairness, we compare Sensitivity and Specificity at specific score cutoffs across different groups. The required tool is available in the SCRIPTS repository, which should already be in your PATH for direct use.
Process Overview
- Run bootstrap analysis to generate detailed results, reporting performance at each 1% increment of positive rate (PR) and false positive rate (FPR).
- Define the base cohort (
FAIRNESS_BASE_COHORT
) for baseline performance assessment. - Specify comparison groups (
FAIRNESS_GROUPS
) to stratify and compare within the base cohort.
Example Usage
fairness_extraction.py
Arguments
--bt_report
: Path to the bootstrap output file (should include results for multiple PR or FPR cutoffs and all comparison groups).--bt_cohort
: The base cohort used for baseline filtering. If omitted, the script will use the shortest cohort description found in the bootstrap file.--output
: Directory for output files.--cutoffs_pr
: List of PR cutoffs to evaluate (if not available, FPR will be used), based on the baseline cohort.
The script above first runs the bootstrap analysis, then defines the base cohort and comparison groups (e.g., Gender:1,1
and Gender:2,2
).
Output
The tool compares Sensitivity and Specificity for the specified FAIRNESS_GROUPS
at the same cutoff (e.g., top 3% and 5% positive rate). It also performs a chi-square statistical test to assess differences between groups.