Skip to content

predictive-parity.md's Detection Code references a decile_score/two-year-reoffense schema this repo's COMPAS CSV doesn't have #622

Closed

Description

@yakew7

Where: explainers/predictive-parity.md: compas["flagged_high_risk"] = (compas["decile_score"] >= 7), and prose stating "the target is two-year re-offense."

The gap: this repo's COMPAS/compas-scores-raw.csv has no decile_score column (the real column is DecileScore, capitalized), and per COMPAS/audit.yaml the actual declared target is ScoreText (COMPAS's own risk label), not real two-year re-offense - this repo's COMPAS file has no independent recidivism-outcome column at all.

Repro:

import pandas as pd
compas = pd.read_csv('COMPAS/compas-scores-raw.csv')
compas['flagged_high_risk'] = (compas['decile_score'] >= 7)
# KeyError: 'decile_score'

Same bug class as the already-fixed #601 (6 other explainers) and the sibling #621 (base-rate-fallacy.md) - this file has the identical problem and was outside both batches' scope.

Fix direction: rewrite against the real schema (DecileScore, ScoreText, Ethnic_Code_Text, DisplayText == "Risk of Recidivism" filter, matching COMPAS/unfair.py's recipe), correct the "two-year re-offense" claim to describe what the target actually is, and regenerate the output from an actual run.

Activity

  1. added
    bugSomething isn't working
    help wantedExtra attention is needed
    on Sep 13, 2026
  2. added a commit that references this issue on Oct 21, 2026
    fa131a5
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

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions