Commit ac3810d
committed
Fix reject-inference.md Script Execution Output to match its own code (closes #522)
The 'Script Execution Output' block and the analysis after it were pasted
from an earlier version of the detection code and never regenerated. The
extracted python block, run directly (seeded, byte-identical across runs),
produces near-zero age gaps and ~0.92-0.95 population AUC across all three
models - not the 15.80 -> 2.30 point gap and 0.7812 -> 0.8345 AUC the doc
claimed.
That is not just a stale number: it is structurally unreachable with this
simulation. y_true carries no age term and the models train on
credit_score and income_k only, both drawn independently of age_young, so
selection acting on age alone is ignorable for estimating P(Y|X) and a
RandomForest recovers a near-parity score distribution with or without
IPW - there is no naive-model gap for the correction to close.
Replaced the output block with the real deterministic figures and
rewrote the analysis to describe what the code actually demonstrates: the
disparity lives entirely in the selection gate (older approval ~50%,
younger ~35%), invisible to any audit run on model scores or on the
approved-only rows - which is exactly 'Why It Matters' item 2. Added a
note that the low-order digits of a seeded RF can shift across
CPU/BLAS backends. Regenerated the HTML, package mirror, and llms-full.txt
section.1 parent fb8a2c0 commit ac3810d
4 files changed
Lines changed: 38 additions & 17 deletions
File tree
- explainers
- faircode/_explainers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
383 | 386 | | |
384 | 387 | | |
385 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
246 | 252 | | |
247 | 253 | | |
248 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
246 | 252 | | |
247 | 253 | | |
248 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9395 | 9395 | | |
9396 | 9396 | | |
9397 | 9397 | | |
9398 | | - | |
9399 | | - | |
9400 | | - | |
| 9398 | + | |
| 9399 | + | |
| 9400 | + | |
9401 | 9401 | | |
9402 | 9402 | | |
9403 | | - | |
| 9403 | + | |
| 9404 | + | |
| 9405 | + | |
| 9406 | + | |
| 9407 | + | |
| 9408 | + | |
| 9409 | + | |
9404 | 9410 | | |
9405 | 9411 | | |
9406 | 9412 | | |
| |||
0 commit comments