Finhaven commited on
Commit
4959211
·
verified ·
1 Parent(s): db57725

Upload 15 files

Browse files
README.md CHANGED
@@ -1,15 +1,55 @@
1
  ---
2
- title: Limitwise
3
- emoji: 💻
4
- colorFrom: indigo
5
- colorTo: indigo
6
  sdk: gradio
7
  sdk_version: 6.31.0
8
- python_version: '3.13'
9
  app_file: app.py
10
  pinned: false
11
  license: cc-by-4.0
12
- short_description: Credit default prediction model
 
 
 
 
 
13
  ---
14
 
15
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Corvana Bank LimitWise
3
+ emoji: 💳
4
+ colorFrom: green
5
+ colorTo: gray
6
  sdk: gradio
7
  sdk_version: 6.31.0
8
+ python_version: "3.12"
9
  app_file: app.py
10
  pinned: false
11
  license: cc-by-4.0
12
+ models:
13
+ - drdavidprivacy/limitwise-model
14
+ datasets:
15
+ - drdavidprivacy/limitwise-data
16
+ - drdavidprivacy/practicum-case-packs
17
+ short_description: LimitWise v2, the signed model and its repositories
18
  ---
19
 
20
+ # LimitWise v2: Corvana Bank
21
+
22
+ **Kept by:** Tom Becker, AI Governance Lead. **Signed by:** Anika Rao, Chief AI Officer (Week 6 memo).
23
+
24
+ **Program:** AI Governance Practicum, Track 1, cohort 1
25
+
26
+ This page is the public home of a governed system. The model is LimitWise v2, the version the Chief AI Officer signed in Week 6. The app has four tabs: one account (the three Week 6 cases and the record's own reasons), a batch upload (score and rank a file), monitoring (read a month against the reference file with Evidently's data-drift report), and the repositories (the links below).
27
+
28
+ ## The signed version
29
+
30
+ - File: `limitwise_v2.pkl`, 18,636 bytes, SHA-256 `7842edc29acd316873ffa482db705ab2ea09427f8b4e1186436713d316de8ecb`
31
+ - Recalibration object: `limitwise_v2_recalibrated.pkl`, 89,015 bytes, SHA-256 `b6508dfcc69ca108e3f08fc2be0843dab1d2517355970b8e622e52a34127ca37` (the isotonic recalibration the Week 6 memo ratified; the odds correction to the 3 percent book rate, 0.1089, is applied in the app)
32
+ - Plain-language reasons: `reasons.csv` (one reason for every value of every input)
33
+ - Operating point: the top 10 percent of the ranked file
34
+ - Libraries: scikit-learn 1.9.1, fairlearn 0.15.0
35
+ - Data: the remediated working file in the program's dataset repository, loaded by link, never copied here: https://huggingface.co/datasets/drdavidprivacy/practicum-case-packs/resolve/main/corvana_modeling_extract_remediated.csv (MD5 `f79f13a5119f78572e9f6cc3243ea6ae`)
36
+
37
+ ## Monitoring (Week 8)
38
+
39
+ - `limitwise_reference.csv`: the Week 6 test set reweighted to the 3 percent book rate (every paying account four times, 578 defaulters once, 19,266 accounts), the file every month is read against. The Week 6 cut on this page is the score of the last account inside the top 10 percent of that file.
40
+ - `limitwise_month_1.csv` to `_month_5.csv`: five monthly files of 20,000 accounts, drawn at the book rate. One has no drift, one has data drift the model shrugs off, one has drift that moves the scores and the outcomes, one has a performance drop, one has a fairness gap. Tab 3 runs Evidently's data-drift report on any of them, or on a file of your own, and reads the caught rate and the groups the Week 6 memo watches.
41
+
42
+ ## The repositories
43
+
44
+ - Model repository (the model card, the signed file and its hash, the weights): https://huggingface.co/drdavidprivacy/limitwise-model
45
+ - Dataset repository (the datasheet and the remediation log): https://huggingface.co/datasets/drdavidprivacy/limitwise-data
46
+ - Portfolio page (the six deliverables as PDFs, the page each learner builds under their own name): https://huggingface.co/spaces/drdavidprivacy/corvana-portfolio
47
+ - Collection: https://huggingface.co/collections/drdavidprivacy/limitwise-governance-repository-6ae5ff9b374cab20b18250eb
48
+
49
+ ## What this page is not
50
+
51
+ A score says where a cardholder's record ranks on one list. It is not a decision about the cardholder. The decisions, and the conditions on them, are on the portfolio page.
52
+
53
+ ## Source
54
+
55
+ Built for the AI Governance Practicum (AI Governance Collective). The organization, the people, and the program are fictional. The data is a public dataset, remediated and documented in the dataset repository's datasheet.
app.py ADDED
@@ -0,0 +1,383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """The public page of a governed system: the signed model, its monitoring page, and the links to its repositories.
2
+ Built for the AI Governance Practicum (AI Governance Collective). One app.py serves all three organizations; space_config.json says which."""
3
+ import json, os, pickle, io, warnings
4
+ import numpy as np, pandas as pd
5
+ import gradio as gr
6
+ import matplotlib
7
+ matplotlib.use("Agg")
8
+ import matplotlib.pyplot as plt
9
+ warnings.filterwarnings("ignore")
10
+
11
+ HERE = os.path.dirname(os.path.abspath(__file__))
12
+
13
+ # Hugging Face's free tier runs Gradio Spaces on ZeroGPU, which refuses to start an app that declares no GPU function.
14
+ # This app needs no GPU: the declaration below satisfies the check and is never called. On a plain CPU Space it is skipped.
15
+ try:
16
+ import spaces
17
+ @spaces.GPU
18
+ def _gpu_not_used():
19
+ return "This app runs on the CPU."
20
+ except Exception:
21
+ pass
22
+ CFG = json.load(open(os.path.join(HERE, "space_config.json")))
23
+ REF = json.load(open(os.path.join(HERE, "reference.json")))
24
+ MODEL = pickle.load(open(os.path.join(HERE, CFG["model_file"]), "rb"))
25
+ RECAL = pickle.load(open(os.path.join(HERE, CFG["recal_file"]), "rb")) if CFG.get("recal_file") else None
26
+ REASONS = pd.read_csv(os.path.join(HERE, CFG["reasons_file"])) if CFG.get("reasons_file") else None
27
+ EXAMPLES = pd.read_csv(os.path.join(HERE, "examples.csv"), keep_default_na=False)
28
+ INPUTS, KEPT, SHARE = CFG["inputs"], CFG["kept"], CFG["share"]
29
+ SPACE_ID = os.environ.get("SPACE_ID", "")
30
+ WEEK6 = CFG["week6"]
31
+
32
+ # ----------------------------------------------------------------------------- scoring
33
+ def score_frame(X):
34
+ """The production score. Where the Week 6 memo ratified fitted steps (the recalibration and the odds correction), they run here."""
35
+ X = X[INPUTS]
36
+ if RECAL is not None:
37
+ pf = RECAL.predict_proba(X)[:, 1]; f = CFG["odds_factor"]
38
+ return pf * f / (pf * f + 1 - pf)
39
+ return MODEL.predict_proba(X)[:, 1]
40
+
41
+ def contributions(X):
42
+ """Each input's fixed weight times the record's value on the scaled, remover-adjusted inputs. The record's own reasons."""
43
+ Z = X[INPUTS]
44
+ for name, step in MODEL.steps[:-1]:
45
+ Z = step.transform(Z)
46
+ coef = MODEL.named_steps["model"].coef_[0]
47
+ return pd.DataFrame(np.asarray(Z) * coef, columns=KEPT, index=X.index)
48
+
49
+ def allowed_reasons(con):
50
+ """Drop the columns a reason may never cite: a medication the record marks No (Alderwyn, Week 6 memo, ruling 5)."""
51
+ drugs = CFG.get("drug_fields", [])
52
+ if not drugs: return con
53
+ keep = [c for c in con.index if not any(c == d + "_No" for d in drugs)]
54
+ return con[keep]
55
+
56
+ def allowed_reasons_frame(frame):
57
+ drugs = CFG.get("drug_fields", [])
58
+ return frame[[c for c in frame.columns if not any(c == d + "_No" for d in drugs)]] if drugs else frame
59
+
60
+ def readable(col):
61
+ if REASONS is not None:
62
+ r = REASONS.loc[(REASONS.input == col) | ((REASONS.input + "_" + REASONS.value.astype(str)) == col), "reason"]
63
+ if len(r): return r.iloc[0]
64
+ for c in CFG["categorical"]:
65
+ if col.startswith(c + "_"): return f"{c} is {col[len(c) + 1:]}"
66
+ return col
67
+
68
+ _ENC = MODEL.named_steps[MODEL.steps[0][0]]
69
+ _CAT_KIND = {}
70
+ for _name, _trans, _cols in _ENC.transformers_:
71
+ if _name == "cat":
72
+ for _c, _cats in zip(_cols, _trans.categories_): _CAT_KIND[_c] = "num" if np.issubdtype(np.asarray(_cats).dtype, np.number) else "str"
73
+
74
+ def coerce(df):
75
+ """Read a file the way the working file was read when the model was fitted: numeric inputs as numbers, categorical inputs as text,
76
+ except the coded categoricals the encoder learned as numbers (a code column read from a CSV as text would otherwise be unknown to it)."""
77
+ df = df.copy()
78
+ for c in CFG["numeric"]:
79
+ if c in df: df[c] = pd.to_numeric(df[c], errors="coerce")
80
+ for c in CFG["categorical"]:
81
+ if c in df: df[c] = pd.to_numeric(df[c], errors="coerce") if _CAT_KIND.get(c) == "num" else df[c].astype(str)
82
+ return df
83
+
84
+ def groups_of(frame):
85
+ g = {}
86
+ for gname, d in CFG["groups"].items():
87
+ col = d["col"]
88
+ if col not in frame: continue
89
+ if "bands" in d:
90
+ v = pd.to_numeric(frame[col], errors="coerce"); lab = pd.Series(["unrecorded"] * len(frame), index=frame.index, dtype=object)
91
+ for lo, hi, name in d["bands"]: lab[(v >= lo) & (v <= hi)] = name
92
+ g[gname] = lab
93
+ else:
94
+ s = frame[col].astype(str); g[gname] = s.map(d["map"]).fillna(s) if d.get("map") else s
95
+ return pd.DataFrame(g, index=frame.index)
96
+
97
+ def pct(x, d=1): return f"{x * 100:.{d}f} percent"
98
+
99
+ # ----------------------------------------------------------------------------- the signed version (the collapsed panel at the top)
100
+ def model_header():
101
+ a = CFG["artifacts"][CFG["model_file"]]
102
+ L = [f"**Organization:** {CFG['org']}. **Signed by:** {CFG['caio']} ({CFG['memo_ref']}). **Kept by:** {CFG['lead']}.",
103
+ f"**File:** `{CFG['model_file']}`, {a['bytes']:,} bytes, SHA-256 `{a['sha256']}`."]
104
+ if RECAL is not None:
105
+ r = CFG["artifacts"][CFG["recal_file"]]
106
+ L.append(f"**Fitted steps the memo ratified:** the isotonic recalibration (`{CFG['recal_file']}`, SHA-256 `{r['sha256']}`), then the odds correction to the {int(CFG['calibration']['book_rate']*100)} percent book rate (factor {CFG['odds_factor']}). Every score on this page has both applied.")
107
+ L.append(f"**What it is:** a logistic regression with {len(KEPT)} fitted columns from {len(INPUTS)} input fields. The weights are fixed. The same record gets the same score every time.")
108
+ L.append(f"**Operating point:** the top {int(SHARE*100)} percent of the ranked file gets {CFG['action']}. On the Week 6 test set ({WEEK6['test_rows']:,} {CFG['units']}) that was {WEEK6['flagged']:,} {CFG['units']}, of which {WEEK6['caught']:,} were {CFG['positive_label']}. Test-set ROC-AUC {WEEK6['roc_auc']:.3f}.")
109
+ L.append(f"**Libraries:** scikit-learn {CFG['versions']['sklearn']}, fairlearn {CFG['versions']['fairlearn']}. The model does not load on another version of scikit-learn, by design.")
110
+ return "\n\n".join(L)
111
+
112
+ def weights_table(n=25):
113
+ return pd.DataFrame([dict(column=c, weight=round(w, 4), meaning=readable(c)) for c, w in CFG["weights"][:n]])
114
+
115
+ # ----------------------------------------------------------------------------- tab 1: one record
116
+ CAT = [c for c in INPUTS if c in CFG["categorical"]]
117
+ NUM = [c for c in INPUTS if c in CFG["numeric"]]
118
+ FORM = CAT + NUM # the order of the form's controls
119
+
120
+ def _typical():
121
+ d = {c: REF["numeric"][c]["median"] for c in NUM}
122
+ for c in CAT:
123
+ r = REF["categorical"][c]; d[c] = max(r, key=r.get)
124
+ return d
125
+
126
+ def _case_row(i):
127
+ row = EXAMPLES.iloc[i]
128
+ return {c: (float(row[c]) if c in NUM else str(row[c])) for c in FORM}
129
+
130
+ PRESETS = {f"Typical {CFG['unit']} (training-file medians and most common values)": _typical()}
131
+ for i in range(len(EXAMPLES)):
132
+ PRESETS[f"{EXAMPLES['case'].iloc[i].capitalize()} (Week 6 case, rank {EXAMPLES['week6_rank'].iloc[i]} of {WEEK6['test_rows']:,})"] = _case_row(i)
133
+ FIRST = list(PRESETS)[0]
134
+
135
+ def apply_preset(name):
136
+ d = PRESETS[name]
137
+ return [d[c] for c in FORM]
138
+
139
+ def field_label(c):
140
+ """The input's name, with the meaning of its codes where the program's group definitions give one (SEX: 1 male, 2 female)."""
141
+ for d in CFG["groups"].values():
142
+ if d["col"] == c and d.get("map"):
143
+ return c + " (" + ", ".join(f"{k} {v}" for k, v in d["map"].items()) + ")"
144
+ return c
145
+
146
+ def choices_for(c):
147
+ ch = sorted(REF["categorical"][c], key=str)
148
+ for v in EXAMPLES[c].astype(str).unique():
149
+ if v not in ch: ch.append(v)
150
+ return ch
151
+
152
+ def score_one(*vals):
153
+ row = {c: v for c, v in zip(FORM, vals)}
154
+ X = coerce(pd.DataFrame([row]))
155
+ p = float(score_frame(X)[0]); cut = REF["cut_score"]; inside = p >= cut
156
+ verdict = (f"## Score: **{p:.1%}**\n\n"
157
+ f"### {'🔴 Above the cut' if inside else '🟢 Below the cut'} (Week 6 cut = {cut:.1%}, the score of the last {CFG['unit']} inside the top {int(SHARE*100)} percent)\n\n"
158
+ f"At the operating point the {CFG['memo_ref']} set, this {CFG['unit']} {'would' if inside else 'would not'} be {CFG['flagged_word']}: {CFG['action']}. "
159
+ f"The score says where the record ranks. It is not a decision about the {CFG['person']}.")
160
+ con = allowed_reasons(contributions(X).iloc[0])
161
+ up = con[con > 0].sort_values(ascending=False).head(6); down = con[con < 0].sort_values().head(4)
162
+ items = list(up.items()) + list(down.items())
163
+ labs = [readable(c) for c, _ in items][::-1]; v = [float(x) for _, x in items][::-1]
164
+ fig, ax = plt.subplots(figsize=(11, 0.45 * len(v) + 1.8))
165
+ ax.barh(range(len(v)), v, color=["#d62728" if x > 0 else "#2ca02c" for x in v])
166
+ ax.set_yticks(range(len(v))); ax.set_yticklabels(labs, fontsize=9); ax.axvline(0, color="black", lw=0.8)
167
+ ax.set_xlabel(f"Toward {CFG['positive_label']} (red) or away from it (green): the fixed weight times this record's value", fontsize=9)
168
+ ax.set_title(f"Why {CFG['system']} scored this {CFG['unit']} {p:.1%}: the record's own reasons", fontsize=11, loc="left")
169
+ fig.tight_layout()
170
+ return verdict, fig
171
+
172
+ # ----------------------------------------------------------------------------- tab 2: batch upload
173
+ def score_batch(file, top_n):
174
+ if file is None: return None, f"Upload a CSV of {CFG['units']} to score (the model's input columns, one row per {CFG['unit']}).", None
175
+ try: df = coerce(pd.read_csv(file.name if hasattr(file, "name") else file, low_memory=False, keep_default_na=False, na_values=[]))
176
+ except Exception as e: return None, f"Could not read the file: {e}", None
177
+ missing = [c for c in INPUTS if c not in df.columns]
178
+ if missing: return None, "The file is missing input columns: " + ", ".join(missing) + ". Nothing was scored.", None
179
+ s = score_frame(df); order = np.argsort(-s, kind="stable"); k = int(round(SHARE * len(df)))
180
+ idc = CFG.get("id_col"); ids = df[idc].values if idc and idc in df.columns else np.arange(1, len(df) + 1)
181
+ con = allowed_reasons_frame(contributions(df)); top = [readable(con.columns[i]) for i in np.argmax(con.values, axis=1)]
182
+ out = pd.DataFrame({(idc if idc and idc in df.columns else "row"): ids, "score": np.round(s, 4), "ranked_in": np.where(np.arange(len(df)) >= 0, "", ""), "top_reason": top})
183
+ out = out.iloc[order].reset_index(drop=True); out.insert(0, "rank", np.arange(1, len(df) + 1)); out["ranked_in"] = np.where(out["rank"] <= k, "yes", "no")
184
+ path = os.path.join("/tmp", "ranked_list.csv"); out.to_csv(path, index=False)
185
+ msg = (f"Scored **{len(df):,}** {CFG['units']}. The top {int(SHARE*100)} percent, the operating point, is **{k:,}** {CFG['units']}. "
186
+ f"Showing the top **{int(top_n)}** by score (the team's capacity). The download carries every record with its score, rank, whether it is ranked in, and its own top reason.")
187
+ return out.head(int(top_n)), msg, path
188
+
189
+ # ----------------------------------------------------------------------------- tab 3: monitoring (Evidently)
190
+ import html as _html
191
+ REFERENCE = pd.read_csv(os.path.join(HERE, f"{CFG['short']}_reference.csv"), low_memory=False, keep_default_na=False, na_values=[])
192
+ MONTHS = {f"Month {i}": f"{CFG['short']}_month_{i}.csv" for i in (1, 2, 3, 4, 5) if os.path.exists(os.path.join(HERE, f"{CFG['short']}_month_{i}.csv"))}
193
+ MIN_GROUP = 30 # a group's rate is shown but not judged below this many of the people it is a rate of
194
+ SCORE_COL, FLAG_COL = "predicted_score", "flagged"
195
+
196
+ def monitoring_frame(df):
197
+ """The columns Evidently reads: every field in the file except the identifier, plus the model's score and the flag. Numbers as numbers, text as text."""
198
+ df = coerce(df); out = pd.DataFrame(index=df.index)
199
+ skip = {CFG.get("id_col")} | {SCORE_COL, FLAG_COL}
200
+ num, cat = [], []
201
+ for c in df.columns:
202
+ if c in skip or c is None: continue
203
+ if c in CFG["numeric"] or (c not in CFG["categorical"] and pd.api.types.is_numeric_dtype(df[c]) and c != CFG["outcome"]):
204
+ out[c] = pd.to_numeric(df[c], errors="coerce").astype("float64").to_numpy(); num.append(c)
205
+ else:
206
+ out[c] = df[c].astype(str).to_numpy().astype(object); cat.append(c)
207
+ s = score_frame(df); out[SCORE_COL] = s.astype("float64"); num.append(SCORE_COL)
208
+ out[FLAG_COL] = np.where(s >= REF["cut_score"], "flagged", "not flagged").astype(object); cat.append(FLAG_COL)
209
+ return out, num, cat
210
+
211
+ def rates(frame, s):
212
+ """Caught rate (the share of {positives} the model flagged) and false alarm rate (the share of the others it flagged), for the file and by group."""
213
+ y = (frame[CFG["outcome"]].astype(str) == str(CFG["positive"])).to_numpy(); flag = s >= REF["cut_score"]
214
+ whole = dict(caught=float(flag[y].mean()) if y.any() else None, false_alarm=float(flag[~y].mean()) if (~y).any() else None, positives=int(y.sum()))
215
+ G = groups_of(frame); by = {}
216
+ for dim in G.columns:
217
+ rows = []
218
+ for name in sorted(G[dim].astype(str).unique(), key=str):
219
+ m = (G[dim].astype(str) == name).to_numpy(); yp, yn = y & m, (~y) & m
220
+ rows.append(dict(group=name, n=int(m.sum()), positives=int(yp.sum()), negatives=int(yn.sum()),
221
+ caught=float(flag[yp].mean()) if yp.sum() else None, false_alarm=float(flag[yn].mean()) if yn.sum() else None))
222
+ by[dim] = rows
223
+ return whole, by
224
+
225
+ def gap(rows, key, denom):
226
+ use = [r[key] for r in rows if r[key] is not None and r[denom] >= MIN_GROUP]
227
+ return (max(use) - min(use)) if len(use) >= 2 else None
228
+
229
+ def fmt(x, d=1): return "" if x is None else f"{x * 100:.{d}f}"
230
+
231
+ def group_table(by_ref, by_cur):
232
+ out = []
233
+ for dim, rows in by_cur.items():
234
+ ref = {r["group"]: r for r in by_ref.get(dim, [])}
235
+ for r in rows:
236
+ rr = ref.get(r["group"], {})
237
+ out.append({"group": f"{dim}: {r['group']}", f"{CFG['units']} this month": r["n"], f"of which {CFG['positive_label']}": r["positives"],
238
+ "caught rate, reference": fmt(rr.get("caught")), "caught rate, this month": fmt(r["caught"]) + ("" if r["positives"] >= MIN_GROUP else " (too few to judge)"),
239
+ "false alarm rate, reference": fmt(rr.get("false_alarm")), "false alarm rate, this month": fmt(r["false_alarm"]) + ("" if r["negatives"] >= MIN_GROUP else " (too few to judge)")})
240
+ return pd.DataFrame(out)
241
+
242
+ def monitor(choice, file):
243
+ """Run Evidently's data-drift report for one month against the reference file, and summarize the signals above it:
244
+ the inputs, the scores, the outcomes, the caught rate, and the groups the Week 6 memo watches."""
245
+ if file is not None:
246
+ try: cur = pd.read_csv(file.name if hasattr(file, "name") else file, low_memory=False, keep_default_na=False, na_values=[]); label = "your file"
247
+ except Exception as e: return f"Could not read the file: {e}", None, "", None
248
+ elif choice in MONTHS:
249
+ cur = pd.read_csv(os.path.join(HERE, MONTHS[choice]), low_memory=False, keep_default_na=False, na_values=[]); label = choice
250
+ else:
251
+ return "Pick a month, or upload a file.", None, "", None
252
+ missing = [c for c in INPUTS if c not in cur.columns]
253
+ if missing: return "The file is missing input columns: " + ", ".join(missing) + ". Nothing was read.", None, "", None
254
+ from evidently import Dataset, DataDefinition, Report
255
+ from evidently.presets import DataDriftPreset
256
+ ref_f, num, cat = monitoring_frame(REFERENCE)
257
+ cur_f, num_c, cat_c = monitoring_frame(cur)
258
+ cols = [c for c in ref_f.columns if c in cur_f.columns]
259
+ num = [c for c in num if c in cols]; cat = [c for c in cat if c in cols]
260
+ dd = DataDefinition(numerical_columns=num, categorical_columns=cat)
261
+ # two-sided proportion test for the yes/no columns (the flag and the outcome), where a distance score reads a real shift as small
262
+ binary = [c for c in (FLAG_COL, CFG["outcome"]) if c in cat]
263
+ preset = DataDriftPreset(per_column_method={c: "z" for c in binary}, per_column_threshold={c: 0.05 for c in binary})
264
+ snap = Report([preset]).run(Dataset.from_pandas(cur_f[cols], data_definition=dd), Dataset.from_pandas(ref_f[cols], data_definition=dd))
265
+ ms = snap.dict()["metrics"]
266
+ def is_drift(m):
267
+ c = m.get("config", {}); col = c.get("column")
268
+ if not col: return False
269
+ if col in binary: return float(m["value"]) < c.get("threshold", 0.05) # a p-value
270
+ return float(m["value"]) > c.get("threshold", 0.1) # a distance
271
+ drifted = [m["config"]["column"] for m in ms[1:] if is_drift(m)]
272
+ inputs_drifted = [c for c in drifted if c in INPUTS]; other_drifted = [c for c in drifted if c not in INPUTS and c not in (SCORE_COL, FLAG_COL, CFG["outcome"])]
273
+ s_ref, s_cur = ref_f[SCORE_COL].values, cur_f[SCORE_COL].values
274
+ f_ref, f_cur = float((s_ref >= REF["cut_score"]).mean()), float((s_cur >= REF["cut_score"]).mean())
275
+ L = [f"**{label}:** {len(cur):,} {CFG['units']} read against the reference file ({len(REFERENCE):,} {CFG['units']}, {CFG.get('reference_label', 'the Week 6 test set')}). Every column in the file is compared, plus the model's score and whether the {CFG['unit']} is flagged at the Week 6 cut.", ""]
276
+ L.append(f"**The inputs.** {len(inputs_drifted)} of {len(INPUTS)} input columns drifted" + (": " + ", ".join(inputs_drifted) + "." if inputs_drifted else ".") + (f" Other fields in the file that drifted (not model inputs): {', '.join(other_drifted)}." if other_drifted else ""))
277
+ L.append(f"**The scores.** Mean score {s_ref.mean():.4f} in the reference, {s_cur.mean():.4f} this month. Share flagged at the Week 6 cut: {pct(f_ref)} in the reference, {pct(f_cur)} this month." + (" The score column drifted." if SCORE_COL in drifted else " The score column did not drift."))
278
+ table = None
279
+ if CFG["outcome"] in cur.columns:
280
+ o_ref = float((REFERENCE[CFG["outcome"]].astype(str) == str(CFG["positive"])).mean()); o_cur = float((cur[CFG["outcome"]].astype(str) == str(CFG["positive"])).mean())
281
+ L.append(f"**The outcomes.** {CFG['positive_label'].capitalize()}: {pct(o_ref)} of the reference, {pct(o_cur)} this month." + (" The outcome column drifted." if CFG["outcome"] in drifted else " The outcome column did not drift."))
282
+ w_ref, by_ref = rates(REFERENCE, s_ref); w_cur, by_cur = rates(cur, s_cur)
283
+ L.append(f"**The caught rate.** Of the {CFG['units']} whose outcome is {CFG['positive_label']}, the share the model flagged at the Week 6 cut: {pct(w_ref['caught'])} in the reference, {pct(w_cur['caught'])} this month. "
284
+ f"False alarm rate (the share of the others it flagged): {pct(w_ref['false_alarm'])} in the reference, {pct(w_cur['false_alarm'])} this month.")
285
+ parts = []
286
+ for dim in by_cur:
287
+ g_ref, g_cur = gap(by_ref[dim], "caught", "positives"), gap(by_cur[dim], "caught", "positives")
288
+ f_ref, f_cur = gap(by_ref[dim], "false_alarm", "negatives"), gap(by_cur[dim], "false_alarm", "negatives")
289
+ bits = []
290
+ if g_ref is not None and g_cur is not None: bits.append(f"caught-rate gap {fmt(g_ref)} to {fmt(g_cur)} points")
291
+ if f_ref is not None and f_cur is not None: bits.append(f"false alarm gap {fmt(f_ref)} to {fmt(f_cur)} points")
292
+ if bits: parts.append(f"{dim}: " + ", ".join(bits))
293
+ L.append("**The groups.** The widest gap between any two groups (groups with at least 30 of the people the rate is about), reference to this month. " + "; ".join(parts) + ". The table below has every group.")
294
+ table = group_table(by_ref, by_cur)
295
+ else:
296
+ L.append("**The outcomes.** This file carries no outcome column, so the outcome rate, the caught rate, and the group gaps cannot be read yet.")
297
+ L.append("\nThe full report is below (Evidently, data drift preset: Wasserstein distance for numbers, Jensen-Shannon distance for categories, drift called at 0.1, and a proportion test for the flag and the outcome). Download it as a page to keep with your monitoring read.")
298
+ report_html = snap.get_html_str(as_iframe=False)
299
+ path = os.path.join("/tmp", f"{CFG['short']}_{label.replace(' ', '_')}_evidently_report.html"); open(path, "w", encoding="utf-8").write(report_html)
300
+ frame = f'<iframe srcdoc="{_html.escape(report_html, quote=True)}" style="width:100%;height:1400px;border:1px solid #ddd;border-radius:8px;background:white"></iframe>'
301
+ return "\n".join(L), table, frame, path
302
+
303
+ # ----------------------------------------------------------------------------- tab 4: the repositories
304
+ def repositories_markdown():
305
+ short = CFG["short"]
306
+ L = [f"## The repositories: {CFG['system']} at {CFG['org']}", "",
307
+ "A governed system leaves its record in several places, and this page is only one of them. Each link opens on Hugging Face.", "",
308
+ f"- **Model repository**, [drdavidprivacy/{short}-model](https://huggingface.co/drdavidprivacy/{short}-model): the model card, the signed file and its SHA-256, and the fixed weights as a table. The card on the page is the AI Governance Lead's exemplar.",
309
+ f"- **Dataset repository**, [drdavidprivacy/{short}-data](https://huggingface.co/datasets/drdavidprivacy/{short}-data): the datasheet and the remediation log for the working file. The data itself is linked, not copied.",
310
+ f"- **Portfolio page**, [drdavidprivacy/{CFG['portfolio']}](https://huggingface.co/spaces/drdavidprivacy/{CFG['portfolio']}): the six deliverables of the practicum as PDFs, in course order, on a page with no code behind it. Each learner builds one of these under their own name.",
311
+ f"- **Collection**, [{CFG['collection_name']}]({CFG['collection_url']}): all of the above in one place.", ""]
312
+ L += [f"**Monitoring targets from the {CFG['memo_ref']}:**"] + [f"- {m}" for m in CFG["monitoring_lines"]]
313
+ L += ["", f"**Data:** [{CFG['data_file']}]({CFG['data_url']}) in the program's dataset repository (MD5 `{CFG['md5']}`). The data is not copied into this page."]
314
+ return "\n".join(L)
315
+
316
+ # ----------------------------------------------------------------------------- the page
317
+ INTRO = f"""
318
+ # {CFG['system']} {CFG['version']}: {CFG['org']}
319
+ **Kept by: {CFG['lead']}** · a teaching deployment for the *AI Governance Practicum*, Track 1
320
+
321
+ ---
322
+
323
+ {CFG['system']} estimates, for each {CFG['unit']}, the likelihood of {CFG['positive_label']}, ranks the file, and sends the top {int(SHARE*100)} percent to a person for {CFG['action']}. This page runs the signed version ({CFG['memo_ref']}). It is for **education**, not real decisions. A score says where a {CFG['person']}'s record ranks on one list. It is not a decision about the {CFG['person']}.
324
+ """
325
+
326
+ with gr.Blocks(title=f"{CFG['org']} {CFG['system']}") as demo:
327
+ gr.Markdown(INTRO)
328
+ with gr.Accordion("About the signed version: the file, its hash, the fitted steps, the weights", open=False):
329
+ gr.Markdown(model_header())
330
+ gr.Markdown("**The fixed weights.** The largest by size, with what each column means. A positive weight pushes the score up.")
331
+ gr.Dataframe(weights_table(), interactive=False, wrap=True)
332
+
333
+ with gr.Tab(f"1 · Single {CFG['unit']}"):
334
+ gr.Markdown(f"Score one {CFG['unit']}, then read the **reasons**. Load a Week 6 case to fill the form, or edit any field and score again.")
335
+ with gr.Row():
336
+ preset = gr.Dropdown(list(PRESETS), label="Load an example", value=FIRST)
337
+ d0 = PRESETS[FIRST]
338
+ widgets = {}
339
+ with gr.Accordion("Categorical inputs", open=True):
340
+ for i in range(0, len(CAT), 4):
341
+ with gr.Row():
342
+ for c in CAT[i:i + 4]:
343
+ widgets[c] = gr.Dropdown(choices_for(c), value=d0[c], label=field_label(c), allow_custom_value=True)
344
+ with gr.Accordion("Numeric inputs", open=(len(CAT) == 0)):
345
+ for i in range(0, len(NUM), 4):
346
+ with gr.Row():
347
+ for c in NUM[i:i + 4]:
348
+ widgets[c] = gr.Number(value=d0[c], label=c)
349
+ ordered = [widgets[c] for c in FORM]
350
+ score_btn = gr.Button(f"Score this {CFG['unit']}", variant="primary")
351
+ out_md = gr.Markdown(); out_plot = gr.Plot()
352
+ preset.change(apply_preset, preset, ordered)
353
+ score_btn.click(score_one, ordered, [out_md, out_plot])
354
+
355
+ with gr.Tab("2 · Batch upload"):
356
+ gr.Markdown(f"Upload a CSV of {CFG['units']} (the same columns as the working file). {CFG['system']} scores every row, ranks the file, and marks the top {int(SHARE*100)} percent, the operating point the {CFG['memo_ref']} set. Top-N is how many of the ranked list the team can work. `{CFG['short']}_month_1.csv` in this repository is a file to try.")
357
+ with gr.Row():
358
+ up = gr.File(label=f"{CFG['units'].capitalize()} CSV", file_types=[".csv"])
359
+ with gr.Column():
360
+ topn = gr.Slider(5, 100, value=20, step=5, label="Top-N by capacity (how many the team can work)")
361
+ batch_btn = gr.Button("Score & rank", variant="primary")
362
+ batch_msg = gr.Markdown(); batch_tbl = gr.Dataframe(interactive=False, wrap=True); batch_dl = gr.File(label="Download the full ranked list")
363
+ batch_btn.click(score_batch, [up, topn], [batch_tbl, batch_msg, batch_dl])
364
+
365
+ with gr.Tab("3 · Monitoring"):
366
+ gr.Markdown(f"**One month at a time.** Pick one of the five monthly files, or upload a file of your own, and read it against the reference file ({CFG.get('reference_label', 'the Week 6 test set')}). The page scores every row with the signed version, runs Evidently's data-drift report (every column in the file, the model's score, and the flag at the Week 6 cut), and, where the file carries the outcome, reads the caught rate and the groups the Week 6 memo watches. The five files and the reference are in this repository's Files tab (`{CFG['short']}_reference.csv`, `{CFG['short']}_month_1.csv` to `_5.csv`).")
367
+ if CFG.get("reference_note"): gr.Markdown(CFG["reference_note"])
368
+ with gr.Row():
369
+ m_choice = gr.Dropdown(choices=list(MONTHS), value=(list(MONTHS)[0] if MONTHS else None), label="Monthly file")
370
+ mf = gr.File(label="Or upload a file of your own (CSV)", file_types=[".csv"])
371
+ mon_btn = gr.Button("Run the monitoring report", variant="primary")
372
+ m_msg = gr.Markdown()
373
+ m_tbl = gr.Dataframe(label="The groups: caught rate and false alarm rate, reference and this month (percent)", interactive=False, wrap=True)
374
+ m_dl = gr.File(label="Download the report (HTML)")
375
+ m_html = gr.HTML()
376
+ mon_btn.click(monitor, [m_choice, mf], [m_msg, m_tbl, m_html, m_dl])
377
+ with gr.Tab("4 · The repositories"):
378
+ gr.Markdown(repositories_markdown())
379
+
380
+ gr.Markdown(f"---\n*{CFG['system']} is a fictional model built on a public dataset for the AI Governance Practicum (AI Governance Collective). The organization, the people, and the program are fictional. Data: [{CFG['data_file']}]({CFG['data_url']}).*")
381
+
382
+ if __name__ == "__main__":
383
+ demo.launch()
examples.csv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ case,case_note,ID,LIMIT_BAL,BILL_AMT1,BILL_AMT2,BILL_AMT3,BILL_AMT4,BILL_AMT5,BILL_AMT6,PAY_AMT1,PAY_AMT2,PAY_AMT3,PAY_AMT4,PAY_AMT5,PAY_AMT6,STATUS_0,STATUS_2,STATUS_3,STATUS_4,STATUS_5,STATUS_6,PAID_1,PAID_2,PAID_3,PAID_4,PAID_5,UTIL_RECENT,PAY_RATIO_RECENT,SEX,AGE,MARRIAGE_MODEL,EDUCATION_MODEL,default_payment_next_month,week6_rank
2
+ caught,"caught (flagged, defaulted)",15501,50000.0,47237.0,50632.0,49546.0,49448.0,19887.0,38212.0,4500.0,0.0,1713.0,1003.0,699.0,800.0,delay of 2 months,delay of 2 months,delay of 2 months,"no delinquency recorded, code undefined","no delinquency recorded, code undefined","no delinquency recorded, code undefined",paid part,paid nothing,paid part,paid part,paid part,0.9447,0.0889,1,28,married,university,1,279
3
+ missed,"missed (not flagged, defaulted; the first account below the cut)",9857,20000.0,18540.0,19726.0,8564.0,19775.0,19878.0,19898.0,2000.0,8568.0,19000.0,800.0,1000.0,20000.0,delay of 2 months,"no delinquency recorded, code undefined",paid duly,"no delinquency recorded, code undefined","no delinquency recorded, code undefined","no delinquency recorded, code undefined",paid part,paid in full,paid part,paid part,paid part,0.927,0.1014,2,28,single,graduate school,1,601
4
+ false alarm,"false alarm (flagged, paid; the highest-scored paying account)",13697,30000.0,28859.0,28116.0,30226.0,29454.0,31775.0,30743.0,0.0,2900.0,0.0,2787.0,0.0,1445.0,delay of 2 months,delay of 2 months,delay of 2 months,delay of 2 months,delay of 2 months,delay of 2 months,paid nothing,paid part,paid nothing,paid part,paid nothing,0.962,0.0,2,49,single,university,0,1
limitwise_month_1.csv ADDED
The diff for this file is too large to render. See raw diff
 
limitwise_month_2.csv ADDED
The diff for this file is too large to render. See raw diff
 
limitwise_month_3.csv ADDED
The diff for this file is too large to render. See raw diff
 
limitwise_month_4.csv ADDED
The diff for this file is too large to render. See raw diff
 
limitwise_month_5.csv ADDED
The diff for this file is too large to render. See raw diff
 
limitwise_reference.csv ADDED
The diff for this file is too large to render. See raw diff
 
limitwise_v2.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7842edc29acd316873ffa482db705ab2ea09427f8b4e1186436713d316de8ecb
3
+ size 18636
limitwise_v2_recalibrated.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6508dfcc69ca108e3f08fc2be0843dab1d2517355970b8e622e52a34127ca37
3
+ size 89015
reasons.csv ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ input,value,reason
2
+ LIMIT_BAL,(amount),the account's credit limit
3
+ BILL_AMT1,(amount),the statement balance in the most recent month
4
+ BILL_AMT2,(amount),the statement balance 1 month before the most recent
5
+ BILL_AMT3,(amount),the statement balance 2 months before the most recent
6
+ BILL_AMT4,(amount),the statement balance 3 months before the most recent
7
+ BILL_AMT5,(amount),the statement balance 4 months before the most recent
8
+ BILL_AMT6,(amount),the statement balance 5 months before the most recent
9
+ PAY_AMT1,(amount),the payment made in the most recent month
10
+ PAY_AMT2,(amount),the payment made 1 month before the most recent
11
+ PAY_AMT3,(amount),the payment made 2 months before the most recent
12
+ PAY_AMT4,(amount),the payment made 3 months before the most recent
13
+ PAY_AMT5,(amount),the payment made 4 months before the most recent
14
+ PAY_AMT6,(amount),the payment made 5 months before the most recent
15
+ UTIL_RECENT,(amount),how much of the limit was in use on the most recent statement
16
+ PAY_RATIO_RECENT,(amount),how much of the most recent statement balance was paid
17
+ STATUS_0,delay of 1 month,payment was 1 month late in the most recent month
18
+ STATUS_0,delay of 2 months,payment was 2 months late in the most recent month
19
+ STATUS_0,delay of 3 months,payment was 3 months late in the most recent month
20
+ STATUS_0,delay of 4 months,payment was 4 months late in the most recent month
21
+ STATUS_0,delay of 5 months,payment was 5 months late in the most recent month
22
+ STATUS_0,delay of 6 months,payment was 6 months late in the most recent month
23
+ STATUS_0,delay of 7 months,payment was 7 months late in the most recent month
24
+ STATUS_0,delay of 8 months,payment was 8 months late in the most recent month
25
+ STATUS_0,"no delinquency recorded, code undefined",no delinquency recorded in the most recent month
26
+ STATUS_0,paid duly,paid on time in the most recent month
27
+ STATUS_2,delay of 1 month,payment was 1 month late in the month before the most recent
28
+ STATUS_2,delay of 2 months,payment was 2 months late in the month before the most recent
29
+ STATUS_2,delay of 3 months,payment was 3 months late in the month before the most recent
30
+ STATUS_2,delay of 4 months,payment was 4 months late in the month before the most recent
31
+ STATUS_2,delay of 5 months,payment was 5 months late in the month before the most recent
32
+ STATUS_2,delay of 6 months,payment was 6 months late in the month before the most recent
33
+ STATUS_2,delay of 7 months,payment was 7 months late in the month before the most recent
34
+ STATUS_2,delay of 8 months,payment was 8 months late in the month before the most recent
35
+ STATUS_2,"no delinquency recorded, code undefined",no delinquency recorded in the month before the most recent
36
+ STATUS_2,paid duly,paid on time in the month before the most recent
37
+ STATUS_3,delay of 1 month,payment was 1 month late in two months before the most recent
38
+ STATUS_3,delay of 2 months,payment was 2 months late in two months before the most recent
39
+ STATUS_3,delay of 3 months,payment was 3 months late in two months before the most recent
40
+ STATUS_3,delay of 4 months,payment was 4 months late in two months before the most recent
41
+ STATUS_3,delay of 5 months,payment was 5 months late in two months before the most recent
42
+ STATUS_3,delay of 6 months,payment was 6 months late in two months before the most recent
43
+ STATUS_3,delay of 7 months,payment was 7 months late in two months before the most recent
44
+ STATUS_3,delay of 8 months,payment was 8 months late in two months before the most recent
45
+ STATUS_3,"no delinquency recorded, code undefined",no delinquency recorded in two months before the most recent
46
+ STATUS_3,paid duly,paid on time in two months before the most recent
47
+ STATUS_4,delay of 1 month,payment was 1 month late in three months before the most recent
48
+ STATUS_4,delay of 2 months,payment was 2 months late in three months before the most recent
49
+ STATUS_4,delay of 3 months,payment was 3 months late in three months before the most recent
50
+ STATUS_4,delay of 4 months,payment was 4 months late in three months before the most recent
51
+ STATUS_4,delay of 5 months,payment was 5 months late in three months before the most recent
52
+ STATUS_4,delay of 6 months,payment was 6 months late in three months before the most recent
53
+ STATUS_4,delay of 7 months,payment was 7 months late in three months before the most recent
54
+ STATUS_4,delay of 8 months,payment was 8 months late in three months before the most recent
55
+ STATUS_4,"no delinquency recorded, code undefined",no delinquency recorded in three months before the most recent
56
+ STATUS_4,paid duly,paid on time in three months before the most recent
57
+ STATUS_5,delay of 2 months,payment was 2 months late in four months before the most recent
58
+ STATUS_5,delay of 3 months,payment was 3 months late in four months before the most recent
59
+ STATUS_5,delay of 4 months,payment was 4 months late in four months before the most recent
60
+ STATUS_5,delay of 5 months,payment was 5 months late in four months before the most recent
61
+ STATUS_5,delay of 6 months,payment was 6 months late in four months before the most recent
62
+ STATUS_5,delay of 7 months,payment was 7 months late in four months before the most recent
63
+ STATUS_5,delay of 8 months,payment was 8 months late in four months before the most recent
64
+ STATUS_5,"no delinquency recorded, code undefined",no delinquency recorded in four months before the most recent
65
+ STATUS_5,paid duly,paid on time in four months before the most recent
66
+ STATUS_6,delay of 2 months,payment was 2 months late in five months before the most recent
67
+ STATUS_6,delay of 3 months,payment was 3 months late in five months before the most recent
68
+ STATUS_6,delay of 4 months,payment was 4 months late in five months before the most recent
69
+ STATUS_6,delay of 5 months,payment was 5 months late in five months before the most recent
70
+ STATUS_6,delay of 6 months,payment was 6 months late in five months before the most recent
71
+ STATUS_6,delay of 7 months,payment was 7 months late in five months before the most recent
72
+ STATUS_6,delay of 8 months,payment was 8 months late in five months before the most recent
73
+ STATUS_6,"no delinquency recorded, code undefined",no delinquency recorded in five months before the most recent
74
+ STATUS_6,paid duly,paid on time in five months before the most recent
75
+ PAID_1,no balance,no balance was due in the most recent month
76
+ PAID_1,paid in full,the balance was paid in full in the most recent month
77
+ PAID_1,paid nothing,nothing was paid on the balance in the most recent month
78
+ PAID_1,paid part,part of the balance was paid in the most recent month
79
+ PAID_2,no balance,no balance was due in the month before the most recent
80
+ PAID_2,paid in full,the balance was paid in full in the month before the most recent
81
+ PAID_2,paid nothing,nothing was paid on the balance in the month before the most recent
82
+ PAID_2,paid part,part of the balance was paid in the month before the most recent
83
+ PAID_3,no balance,no balance was due in two months before the most recent
84
+ PAID_3,paid in full,the balance was paid in full in two months before the most recent
85
+ PAID_3,paid nothing,nothing was paid on the balance in two months before the most recent
86
+ PAID_3,paid part,part of the balance was paid in two months before the most recent
87
+ PAID_4,no balance,no balance was due in three months before the most recent
88
+ PAID_4,paid in full,the balance was paid in full in three months before the most recent
89
+ PAID_4,paid nothing,nothing was paid on the balance in three months before the most recent
90
+ PAID_4,paid part,part of the balance was paid in three months before the most recent
91
+ PAID_5,no balance,no balance was due in four months before the most recent
92
+ PAID_5,paid in full,the balance was paid in full in four months before the most recent
93
+ PAID_5,paid nothing,nothing was paid on the balance in four months before the most recent
94
+ PAID_5,paid part,part of the balance was paid in four months before the most recent
reference.json ADDED
@@ -0,0 +1,739 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "rows": 23996,
3
+ "test_rows": 5999,
4
+ "cut_score": 0.05812364061688247,
5
+ "share": 0.1,
6
+ "positive_rate": 0.2212035339223204,
7
+ "numeric": {
8
+ "LIMIT_BAL": {
9
+ "mean": 167270.87847974664,
10
+ "std": 129532.29976426934,
11
+ "median": 140000.0,
12
+ "edges": [
13
+ 10000.0,
14
+ 30000.0,
15
+ 50000.0,
16
+ 70000.0,
17
+ 100000.0,
18
+ 140000.0,
19
+ 180000.0,
20
+ 210000.0,
21
+ 270000.0,
22
+ 360000.0,
23
+ 1000000.0
24
+ ],
25
+ "shares": {
26
+ "0": 0.08284714119019837,
27
+ "1": 0.06105184197366228,
28
+ "2": 0.13927321220203367,
29
+ "3": 0.09814135689281547,
30
+ "4": 0.102975495915986,
31
+ "5": 0.10380896816136023,
32
+ "6": 0.09159859976662778,
33
+ "7": 0.11485247541256877,
34
+ "8": 0.094599099849975,
35
+ "9": 0.11085180863477247
36
+ }
37
+ },
38
+ "BILL_AMT1": {
39
+ "mean": 51202.179904984165,
40
+ "std": 73978.79134449174,
41
+ "median": 22223.0,
42
+ "edges": [
43
+ -165580.0,
44
+ 264.0,
45
+ 1876.0,
46
+ 5992.0,
47
+ 13451.0,
48
+ 22223.0,
49
+ 36908.000000000015,
50
+ 52061.5,
51
+ 83381.0,
52
+ 141741.0,
53
+ 964511.0
54
+ ],
55
+ "shares": {
56
+ "0": 0.09943323887314552,
57
+ "1": 0.10055842640440073,
58
+ "2": 0.09997499583263877,
59
+ "3": 0.10001666944490749,
60
+ "4": 0.10001666944490749,
61
+ "5": 0.10001666944490749,
62
+ "6": 0.09997499583263877,
63
+ "7": 0.09997499583263877,
64
+ "8": 0.10001666944490749,
65
+ "9": 0.10001666944490749
66
+ }
67
+ },
68
+ "BILL_AMT2": {
69
+ "mean": 49259.96032672112,
70
+ "std": 71485.52373749421,
71
+ "median": 21080.5,
72
+ "edges": [
73
+ -69777.0,
74
+ 0.0,
75
+ 1479.0,
76
+ 5518.500000000003,
77
+ 12883.0,
78
+ 21080.5,
79
+ 34702.000000000015,
80
+ 50711.0,
81
+ 80199.0,
82
+ 136949.5,
83
+ 983931.0
84
+ ],
85
+ "shares": {
86
+ "0": 0.021711951991998667,
87
+ "1": 0.1782797132855476,
88
+ "2": 0.10001666944490749,
89
+ "3": 0.09997499583263877,
90
+ "4": 0.10001666944490749,
91
+ "5": 0.10001666944490749,
92
+ "6": 0.09997499583263877,
93
+ "7": 0.09997499583263877,
94
+ "8": 0.10001666944490749,
95
+ "9": 0.10001666944490749
96
+ }
97
+ },
98
+ "BILL_AMT3": {
99
+ "mean": 46981.74654109018,
100
+ "std": 68871.26278346537,
101
+ "median": 19982.5,
102
+ "edges": [
103
+ -61506.0,
104
+ 0.0,
105
+ 1189.0,
106
+ 5176.000000000002,
107
+ 12218.0,
108
+ 19982.5,
109
+ 31192.00000000002,
110
+ 49175.5,
111
+ 76593.0,
112
+ 132127.5,
113
+ 693131.0
114
+ ],
115
+ "shares": {
116
+ "0": 0.021378563093848973,
117
+ "1": 0.17861310218369728,
118
+ "2": 0.10001666944490749,
119
+ "3": 0.09997499583263877,
120
+ "4": 0.10001666944490749,
121
+ "5": 0.10001666944490749,
122
+ "6": 0.09997499583263877,
123
+ "7": 0.09997499583263877,
124
+ "8": 0.10001666944490749,
125
+ "9": 0.10001666944490749
126
+ }
127
+ },
128
+ "BILL_AMT4": {
129
+ "mean": 43342.34055675946,
130
+ "std": 64707.60457814837,
131
+ "median": 19007.5,
132
+ "edges": [
133
+ -81334.0,
134
+ 0.0,
135
+ 992.0,
136
+ 4651.000000000002,
137
+ 11179.0,
138
+ 19007.5,
139
+ 28481.000000000007,
140
+ 45288.0,
141
+ 70415.0,
142
+ 123268.5,
143
+ 891586.0
144
+ ],
145
+ "shares": {
146
+ "0": 0.021920320053342223,
147
+ "1": 0.17807134522420404,
148
+ "2": 0.10001666944490749,
149
+ "3": 0.09997499583263877,
150
+ "4": 0.10001666944490749,
151
+ "5": 0.10001666944490749,
152
+ "6": 0.09997499583263877,
153
+ "7": 0.09993332222037006,
154
+ "8": 0.1000583430571762,
155
+ "9": 0.10001666944490749
156
+ }
157
+ },
158
+ "BILL_AMT5": {
159
+ "mean": 40329.93294715786,
160
+ "std": 61075.619260422885,
161
+ "median": 18104.5,
162
+ "edges": [
163
+ -61372.0,
164
+ 0.0,
165
+ 763.0,
166
+ 3589.500000000001,
167
+ 9793.0,
168
+ 18104.5,
169
+ 26516.00000000001,
170
+ 40631.5,
171
+ 65494.0,
172
+ 116593.0,
173
+ 927171.0
174
+ ],
175
+ "shares": {
176
+ "0": 0.021628604767461243,
177
+ "1": 0.17836306051008502,
178
+ "2": 0.10001666944490749,
179
+ "3": 0.09997499583263877,
180
+ "4": 0.10001666944490749,
181
+ "5": 0.10001666944490749,
182
+ "6": 0.09997499583263877,
183
+ "7": 0.09997499583263877,
184
+ "8": 0.10001666944490749,
185
+ "9": 0.10001666944490749
186
+ }
187
+ },
188
+ "BILL_AMT6": {
189
+ "mean": 38869.986789464914,
190
+ "std": 59786.0983742078,
191
+ "median": 16979.0,
192
+ "edges": [
193
+ -339603.0,
194
+ 0.0,
195
+ 468.0,
196
+ 2650.0,
197
+ 8686.0,
198
+ 16979.0,
199
+ 25321.000000000015,
200
+ 38824.5,
201
+ 62658.0,
202
+ 113650.5,
203
+ 961664.0
204
+ ],
205
+ "shares": {
206
+ "0": 0.022628771461910318,
207
+ "1": 0.17732122020336724,
208
+ "2": 0.10001666944490749,
209
+ "3": 0.10001666944490749,
210
+ "4": 0.10001666944490749,
211
+ "5": 0.10001666944490749,
212
+ "6": 0.09997499583263877,
213
+ "7": 0.09997499583263877,
214
+ "8": 0.10001666944490749,
215
+ "9": 0.10001666944490749
216
+ }
217
+ },
218
+ "PAY_AMT1": {
219
+ "mean": 5679.0855975996,
220
+ "std": 16692.74539074982,
221
+ "median": 2120.0,
222
+ "edges": [
223
+ 0.0,
224
+ 326.0,
225
+ 1270.500000000001,
226
+ 1733.0,
227
+ 2120.0,
228
+ 3000.0,
229
+ 4326.0,
230
+ 6229.0,
231
+ 10400.0,
232
+ 873552.0
233
+ ],
234
+ "shares": {
235
+ "0": 0.19999166527754625,
236
+ "1": 0.10001666944490749,
237
+ "2": 0.09997499583263877,
238
+ "3": 0.09984997499583263,
239
+ "4": 0.07213702283713952,
240
+ "5": 0.12797966327721286,
241
+ "6": 0.10001666944490749,
242
+ "7": 0.09989164860810135,
243
+ "8": 0.10014169028171362
244
+ }
245
+ },
246
+ "PAY_AMT2": {
247
+ "mean": 5834.127937989665,
248
+ "std": 20435.617347531064,
249
+ "median": 2013.0,
250
+ "edges": [
251
+ 0.0,
252
+ 264.0,
253
+ 1165.0,
254
+ 1600.0,
255
+ 2013.0,
256
+ 3000.0,
257
+ 4068.0,
258
+ 6000.0,
259
+ 10405.5,
260
+ 1227082.0
261
+ ],
262
+ "shares": {
263
+ "0": 0.19969994999166527,
264
+ "1": 0.10026671111851976,
265
+ "2": 0.09664110685114186,
266
+ "3": 0.10330888481413569,
267
+ "4": 0.08884814135689281,
268
+ "5": 0.11118519753292215,
269
+ "6": 0.09201533588931489,
270
+ "7": 0.10801800300050009,
271
+ "8": 0.10001666944490749
272
+ }
273
+ },
274
+ "PAY_AMT3": {
275
+ "mean": 5218.560510085014,
276
+ "std": 17543.482408307405,
277
+ "median": 1804.0,
278
+ "edges": [
279
+ 0.0,
280
+ 2.0,
281
+ 780.0,
282
+ 1206.0,
283
+ 1804.0,
284
+ 2500.0,
285
+ 3569.5,
286
+ 5362.0,
287
+ 10000.0,
288
+ 896040.0
289
+ ],
290
+ "shares": {
291
+ "0": 0.1994082347057843,
292
+ "1": 0.09909984997499584,
293
+ "2": 0.10135022503750625,
294
+ "3": 0.10001666944490749,
295
+ "4": 0.09909984997499584,
296
+ "5": 0.10101683613935655,
297
+ "6": 0.09997499583263877,
298
+ "7": 0.0928071345224204,
299
+ "8": 0.10722620436739456
300
+ }
301
+ },
302
+ "PAY_AMT4": {
303
+ "mean": 4796.66569428238,
304
+ "std": 15067.01440928473,
305
+ "median": 1500.0,
306
+ "edges": [
307
+ 0.0,
308
+ 500.0,
309
+ 1000.0,
310
+ 1500.0,
311
+ 2133.0,
312
+ 3200.0,
313
+ 5000.0,
314
+ 9698.0,
315
+ 621000.0
316
+ ],
317
+ "shares": {
318
+ "0": 0.29242373728954824,
319
+ "1": 0.0877229538256376,
320
+ "2": 0.10943490581763628,
321
+ "3": 0.11039339889981664,
322
+ "4": 0.09968328054675779,
323
+ "5": 0.07976329388231372,
324
+ "6": 0.12056176029338223,
325
+ "7": 0.10001666944490749
326
+ }
327
+ },
328
+ "PAY_AMT5": {
329
+ "mean": 4801.144690781797,
330
+ "std": 15152.516693963798,
331
+ "median": 1500.0,
332
+ "edges": [
333
+ 0.0,
334
+ 500.0,
335
+ 1000.0,
336
+ 1500.0,
337
+ 2149.0,
338
+ 3200.0,
339
+ 5000.0,
340
+ 9500.0,
341
+ 426529.0
342
+ ],
343
+ "shares": {
344
+ "0": 0.29500750125020836,
345
+ "1": 0.08334722453742291,
346
+ "2": 0.1087681280213369,
347
+ "3": 0.1128104684114019,
348
+ "4": 0.09914152358726454,
349
+ "5": 0.07888814802467078,
350
+ "6": 0.12160360060010002,
351
+ "7": 0.1004334055675946
352
+ }
353
+ },
354
+ "PAY_AMT6": {
355
+ "mean": 5242.996249374896,
356
+ "std": 17640.841186151476,
357
+ "median": 1500.0,
358
+ "edges": [
359
+ 0.0,
360
+ 416.0,
361
+ 1000.0,
362
+ 1500.0,
363
+ 2100.0,
364
+ 3199.5,
365
+ 5000.0,
366
+ 9619.0,
367
+ 528666.0
368
+ ],
369
+ "shares": {
370
+ "0": 0.29996666111018505,
371
+ "1": 0.09268211368561427,
372
+ "2": 0.10160026671111852,
373
+ "3": 0.10485080846807801,
374
+ "4": 0.10089181530255042,
375
+ "5": 0.08197199533255542,
376
+ "6": 0.11801966994499083,
377
+ "7": 0.10001666944490749
378
+ }
379
+ },
380
+ "UTIL_RECENT": {
381
+ "mean": 0.42326252708784795,
382
+ "std": 0.4107782042096859,
383
+ "median": 0.31445,
384
+ "edges": [
385
+ -0.6199,
386
+ 0.0012,
387
+ 0.0111,
388
+ 0.0403,
389
+ 0.1286,
390
+ 0.31445,
391
+ 0.5236,
392
+ 0.7359,
393
+ 0.9028,
394
+ 0.98125,
395
+ 6.4553
396
+ ],
397
+ "shares": {
398
+ "0": 0.09893315552592098,
399
+ "1": 0.10085014169028171,
400
+ "2": 0.09997499583263877,
401
+ "3": 0.10022503750625104,
402
+ "4": 0.10001666944490749,
403
+ "5": 0.09997499583263877,
404
+ "6": 0.09989164860810135,
405
+ "7": 0.1001000166694449,
406
+ "8": 0.10001666944490749,
407
+ "9": 0.10001666944490749
408
+ }
409
+ },
410
+ "PAY_RATIO_RECENT": {
411
+ "mean": 0.5656217642401378,
412
+ "std": 30.33630146650582,
413
+ "median": 0.0783,
414
+ "edges": [
415
+ 0.0,
416
+ 0.0281,
417
+ 0.0392,
418
+ 0.0458,
419
+ 0.0544,
420
+ 0.0783,
421
+ 0.1288,
422
+ 0.35830000000000056,
423
+ 1.0,
424
+ 1.0003,
425
+ 4444.3333
426
+ ],
427
+ "shares": {
428
+ "0": 0.0997624703087886,
429
+ "1": 0.0991570024684458,
430
+ "2": 0.09943644916398864,
431
+ "3": 0.10101998043873131,
432
+ "4": 0.1005076614969028,
433
+ "5": 0.10008849145358856,
434
+ "6": 0.10004191700433142,
435
+ "7": 0.04494434353313772,
436
+ "8": 0.15453402263518234,
437
+ "9": 0.1005076614969028
438
+ }
439
+ },
440
+ "AGE": {
441
+ "mean": 35.437114519086514,
442
+ "std": 9.188789081976623,
443
+ "median": 34.0,
444
+ "edges": [
445
+ 21.0,
446
+ 25.0,
447
+ 27.0,
448
+ 29.0,
449
+ 31.0,
450
+ 34.0,
451
+ 36.0,
452
+ 40.0,
453
+ 43.0,
454
+ 49.0,
455
+ 75.0
456
+ ],
457
+ "shares": {
458
+ "0": 0.0891398566427738,
459
+ "1": 0.08163860643440574,
460
+ "2": 0.09705784297382897,
461
+ "3": 0.10026671111851976,
462
+ "4": 0.11872812135355892,
463
+ "5": 0.0764294049008168,
464
+ "6": 0.1350641773628938,
465
+ "7": 0.08105517586264377,
466
+ "8": 0.11664444074012335,
467
+ "9": 0.10397566261043507
468
+ }
469
+ }
470
+ },
471
+ "categorical": {
472
+ "STATUS_0": {
473
+ "no delinquency recorded, code undefined": 0.5817219536589432,
474
+ "paid duly": 0.18944824137356225,
475
+ "delay of 1 month": 0.12347891315219203,
476
+ "delay of 2 months": 0.08997332888814802,
477
+ "delay of 3 months": 0.010585097516252709,
478
+ "delay of 4 months": 0.0025420903483913985,
479
+ "delay of 5 months": 0.0007501250208368062,
480
+ "delay of 8 months": 0.0007084514085680946,
481
+ "delay of 6 months": 0.0004167361226871145,
482
+ "delay of 7 months": 0.0003750625104184031
483
+ },
484
+ "STATUS_2": {
485
+ "no delinquency recorded, code undefined": 0.6493165527587932,
486
+ "paid duly": 0.20282547091181863,
487
+ "delay of 2 months": 0.1310218369728288,
488
+ "delay of 3 months": 0.010501750291715286,
489
+ "delay of 4 months": 0.0032505417569594934,
490
+ "delay of 1 month": 0.0009584930821803634,
491
+ "delay of 5 months": 0.0008751458576429405,
492
+ "delay of 7 months": 0.0007501250208368062,
493
+ "delay of 6 months": 0.00045840973495582597,
494
+ "delay of 8 months": 4.167361226871145e-05
495
+ },
496
+ "STATUS_3": {
497
+ "no delinquency recorded, code undefined": 0.6624437406234372,
498
+ "paid duly": 0.19769961660276714,
499
+ "delay of 2 months": 0.12693782297049508,
500
+ "delay of 3 months": 0.007709618269711618,
501
+ "delay of 4 months": 0.00258376396066011,
502
+ "delay of 7 months": 0.000833472245374229,
503
+ "delay of 6 months": 0.000833472245374229,
504
+ "delay of 5 months": 0.0007501250208368062,
505
+ "delay of 1 month": 0.00012502083680613436,
506
+ "delay of 8 months": 8.33472245374229e-05
507
+ },
508
+ "STATUS_4": {
509
+ "no delinquency recorded, code undefined": 0.6939073178863144,
510
+ "paid duly": 0.18898983163860644,
511
+ "delay of 2 months": 0.10547591265210869,
512
+ "delay of 3 months": 0.0058759793298883145,
513
+ "delay of 4 months": 0.002333722287047841,
514
+ "delay of 7 months": 0.0019169861643607267,
515
+ "delay of 5 months": 0.0012502083680613436,
516
+ "delay of 6 months": 0.00012502083680613436,
517
+ "delay of 1 month": 8.33472245374229e-05,
518
+ "delay of 8 months": 4.167361226871145e-05
519
+ },
520
+ "STATUS_5": {
521
+ "no delinquency recorded, code undefined": 0.7158276379396566,
522
+ "paid duly": 0.18494749124854143,
523
+ "delay of 2 months": 0.08780630105017503,
524
+ "delay of 3 months": 0.006001000166694449,
525
+ "delay of 4 months": 0.0027921320220036672,
526
+ "delay of 7 months": 0.0018753125520920154,
527
+ "delay of 5 months": 0.0005834305717619603,
528
+ "delay of 6 months": 0.00012502083680613436,
529
+ "delay of 8 months": 4.167361226871145e-05
530
+ },
531
+ "STATUS_6": {
532
+ "no delinquency recorded, code undefined": 0.7049508251375229,
533
+ "paid duly": 0.19153192198699784,
534
+ "delay of 2 months": 0.09309884980830138,
535
+ "delay of 3 months": 0.0061676946157692945,
536
+ "delay of 4 months": 0.001666944490748458,
537
+ "delay of 7 months": 0.0015835972662110352,
538
+ "delay of 6 months": 0.0005417569594932489,
539
+ "delay of 5 months": 0.0004167361226871145,
540
+ "delay of 8 months": 4.167361226871145e-05
541
+ },
542
+ "PAID_1": {
543
+ "paid part": 0.5919736622770462,
544
+ "paid in full": 0.2281630271711952,
545
+ "no balance": 0.10522587097849642,
546
+ "paid nothing": 0.07463743957326222
547
+ },
548
+ "PAID_2": {
549
+ "paid part": 0.5868894815802633,
550
+ "paid in full": 0.22703783963993998,
551
+ "no balance": 0.11781130188364727,
552
+ "paid nothing": 0.06826137689614936
553
+ },
554
+ "PAID_3": {
555
+ "paid part": 0.5809718286381064,
556
+ "paid in full": 0.21453575595932656,
557
+ "no balance": 0.1284380730121687,
558
+ "paid nothing": 0.0760543423903984
559
+ },
560
+ "PAID_4": {
561
+ "paid part": 0.570345057509585,
562
+ "paid in full": 0.20899316552758793,
563
+ "no balance": 0.13952325387564593,
564
+ "paid nothing": 0.0811385230871812
565
+ },
566
+ "PAID_5": {
567
+ "paid part": 0.5539673278879813,
568
+ "paid in full": 0.2150775129188198,
569
+ "no balance": 0.15781796966161027,
570
+ "paid nothing": 0.0731371895315886
571
+ },
572
+ "SEX": {
573
+ "2": 0.6050591765294215,
574
+ "1": 0.3949408234705784
575
+ },
576
+ "MARRIAGE_MODEL": {
577
+ "single": 0.5344224037339557,
578
+ "married": 0.45282547091181863,
579
+ "other": 0.010668444740790132,
580
+ "unknown": 0.0020836806134355724
581
+ },
582
+ "EDUCATION_MODEL": {
583
+ "university": 0.46970328388064675,
584
+ "graduate school": 0.3530171695282547,
585
+ "high school": 0.16136022670445074,
586
+ "unknown": 0.012002000333388899,
587
+ "other": 0.003917319553258876
588
+ }
589
+ },
590
+ "groups": {
591
+ "sex": {
592
+ "female": 14519,
593
+ "male": 9477
594
+ },
595
+ "age band": {
596
+ "25 to 34": 10466,
597
+ "35 to 44": 7186,
598
+ "45 to 54": 3382,
599
+ "under 25": 2139,
600
+ "55 to 64": 736,
601
+ "65 and over": 87
602
+ },
603
+ "marital status": {
604
+ "single": 12824,
605
+ "married": 10866,
606
+ "other": 256,
607
+ "unknown": 50
608
+ },
609
+ "education": {
610
+ "university": 11271,
611
+ "graduate school": 8471,
612
+ "high school": 3872,
613
+ "unknown": 288,
614
+ "other": 94
615
+ }
616
+ },
617
+ "portfolio": {
618
+ "false_alarm": 0.04195205479452055,
619
+ "miss": 0.6955538809344386,
620
+ "flagged": 600,
621
+ "caught": 404
622
+ },
623
+ "group_rates": {
624
+ "sex": {
625
+ "male": {
626
+ "n": 2407,
627
+ "false_alarm": 0.045921123716909776,
628
+ "miss": 0.7140287769784173,
629
+ "flagged_share": 0.10137100124636476
630
+ },
631
+ "female": {
632
+ "n": 3592,
633
+ "false_alarm": 0.03934774902516838,
634
+ "miss": 0.682230869001297,
635
+ "flagged_share": 0.09910913140311804
636
+ }
637
+ },
638
+ "age band": {
639
+ "35 to 44": {
640
+ "n": 1830,
641
+ "false_alarm": 0.04073033707865169,
642
+ "miss": 0.6945812807881774,
643
+ "flagged_share": 0.0994535519125683
644
+ },
645
+ "25 to 34": {
646
+ "n": 2543,
647
+ "false_alarm": 0.03844258255298177,
648
+ "miss": 0.7315175097276264,
649
+ "flagged_share": 0.0849390483680692
650
+ },
651
+ "under 25": {
652
+ "n": 545,
653
+ "false_alarm": 0.059113300492610835,
654
+ "miss": 0.5683453237410072,
655
+ "flagged_share": 0.15412844036697249
656
+ },
657
+ "45 to 54": {
658
+ "n": 851,
659
+ "false_alarm": 0.04186046511627907,
660
+ "miss": 0.7184466019417476,
661
+ "flagged_share": 0.099882491186839
662
+ },
663
+ "55 to 64": {
664
+ "n": 207,
665
+ "false_alarm": 0.059602649006622516,
666
+ "miss": 0.5892857142857143,
667
+ "flagged_share": 0.15458937198067632
668
+ },
669
+ "65 and over": {
670
+ "n": 23,
671
+ "false_alarm": 0.0,
672
+ "miss": 0.8333333333333334,
673
+ "flagged_share": 0.043478260869565216
674
+ }
675
+ },
676
+ "marital status": {
677
+ "single": {
678
+ "n": 3138,
679
+ "false_alarm": 0.044,
680
+ "miss": 0.6943573667711599,
681
+ "flagged_share": 0.09719566602931803
682
+ },
683
+ "married": {
684
+ "n": 2790,
685
+ "false_alarm": 0.03777148253068933,
686
+ "miss": 0.6964285714285714,
687
+ "flagged_share": 0.1017921146953405
688
+ },
689
+ "other": {
690
+ "n": 67,
691
+ "false_alarm": 0.08,
692
+ "miss": 0.7058823529411765,
693
+ "flagged_share": 0.13432835820895522
694
+ },
695
+ "unknown": {
696
+ "n": 4,
697
+ "false_alarm": 0.5,
698
+ "miss": 0.0,
699
+ "flagged_share": 0.5
700
+ }
701
+ },
702
+ "education": {
703
+ "university": {
704
+ "n": 2756,
705
+ "false_alarm": 0.045933014354066985,
706
+ "miss": 0.6801801801801802,
707
+ "flagged_share": 0.11211901306240929
708
+ },
709
+ "graduate school": {
710
+ "n": 2113,
711
+ "false_alarm": 0.030232558139534883,
712
+ "miss": 0.712468193384224,
713
+ "flagged_share": 0.07808802650260294
714
+ },
715
+ "high school": {
716
+ "n": 1044,
717
+ "false_alarm": 0.056338028169014086,
718
+ "miss": 0.7110266159695817,
719
+ "flagged_share": 0.11494252873563218
720
+ },
721
+ "unknown": {
722
+ "n": 57,
723
+ "false_alarm": 0.07407407407407407,
724
+ "miss": 0.6666666666666666,
725
+ "flagged_share": 0.08771929824561403
726
+ },
727
+ "other": {
728
+ "n": 29,
729
+ "false_alarm": 0.0,
730
+ "miss": 0.5,
731
+ "flagged_share": 0.034482758620689655
732
+ }
733
+ }
734
+ },
735
+ "cut_score_test_set": 0.13423639065119367,
736
+ "reference_rows": 19266,
737
+ "reference_positive_rate": 0.03000103809820409,
738
+ "reference_note": "the Week 6 test set reweighted to the 3 percent book rate (each paying account four times, 578 defaulters once); the cut is the top 10 percent of this file"
739
+ }
requirements.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ gradio==6.31.0
2
+ scikit-learn==1.9.1
3
+ fairlearn==0.15.0
4
+ pandas>=2.2,<3.1
5
+ numpy>=1.26
6
+ scipy>=1.11
7
+ matplotlib>=3.8
8
+ evidently==0.7.23
space_config.json ADDED
@@ -0,0 +1,733 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "org": "Corvana Bank",
3
+ "system": "LimitWise",
4
+ "version": "v2",
5
+ "short": "limitwise",
6
+ "emoji": "\ud83d\udcb3",
7
+ "portfolio": "corvana-portfolio",
8
+ "collection_name": "LimitWise Governance Repository",
9
+ "collection_url": "https://huggingface.co/collections/drdavidprivacy/limitwise-governance-repository-6ae5ff9b374cab20b18250eb",
10
+ "model_file": "limitwise_v2.pkl",
11
+ "recal_file": "limitwise_v2_recalibrated.pkl",
12
+ "odds_factor": 0.1089,
13
+ "reasons_file": "reasons.csv",
14
+ "data_file": "corvana_modeling_extract_remediated.csv",
15
+ "md5": "f79f13a5119f78572e9f6cc3243ea6ae",
16
+ "id_col": "ID",
17
+ "outcome": "default_payment_next_month",
18
+ "positive": 1,
19
+ "positive_label": "default",
20
+ "negative_label": "paid",
21
+ "unit": "account",
22
+ "units": "accounts",
23
+ "action": "an outreach call or a hardship offer, reviewed by a person",
24
+ "flagged_word": "on the outreach queue",
25
+ "person": "cardholder",
26
+ "share": 0.1,
27
+ "book_size": 4600000,
28
+ "capacity": 460000,
29
+ "sample_rows": 4500,
30
+ "month_rows": 4000,
31
+ "month_seed": 11,
32
+ "groups": {
33
+ "sex": {
34
+ "col": "SEX",
35
+ "map": {
36
+ "1": "male",
37
+ "2": "female"
38
+ }
39
+ },
40
+ "age band": {
41
+ "col": "AGE",
42
+ "bands": [
43
+ [
44
+ 0,
45
+ 24,
46
+ "under 25"
47
+ ],
48
+ [
49
+ 25,
50
+ 34,
51
+ "25 to 34"
52
+ ],
53
+ [
54
+ 35,
55
+ 44,
56
+ "35 to 44"
57
+ ],
58
+ [
59
+ 45,
60
+ 54,
61
+ "45 to 54"
62
+ ],
63
+ [
64
+ 55,
65
+ 64,
66
+ "55 to 64"
67
+ ],
68
+ [
69
+ 65,
70
+ 200,
71
+ "65 and over"
72
+ ]
73
+ ]
74
+ },
75
+ "marital status": {
76
+ "col": "MARRIAGE_MODEL"
77
+ },
78
+ "education": {
79
+ "col": "EDUCATION_MODEL"
80
+ }
81
+ },
82
+ "min_group": 1000,
83
+ "group_check": "false_alarm",
84
+ "group_tripwire": 0.2,
85
+ "watch_groups": [
86
+ "under 25",
87
+ "high school"
88
+ ],
89
+ "calibration": {
90
+ "bands": [
91
+ [
92
+ 0,
93
+ 0.01,
94
+ "under 1 percent"
95
+ ],
96
+ [
97
+ 0.01,
98
+ 0.03,
99
+ "1 to 3 percent"
100
+ ],
101
+ [
102
+ 0.03,
103
+ 0.08,
104
+ "3 to 8 percent"
105
+ ],
106
+ [
107
+ 0.08,
108
+ 0.2,
109
+ "8 to 20 percent"
110
+ ],
111
+ [
112
+ 0.2,
113
+ 1.0001,
114
+ "over 20 percent"
115
+ ]
116
+ ],
117
+ "tripwire": 0.25,
118
+ "book_rate": 0.03
119
+ },
120
+ "watch_fields": [
121
+ "STATUS_0",
122
+ "STATUS_2",
123
+ "STATUS_3",
124
+ "STATUS_4",
125
+ "STATUS_5",
126
+ "STATUS_6"
127
+ ],
128
+ "watch_fields_label": "the six status fields (Week 6 memo, ruling 6)",
129
+ "week6": {
130
+ "roc_auc": 0.758,
131
+ "flagged": 600,
132
+ "caught": 402,
133
+ "false_alarms": 198,
134
+ "precision": 0.67,
135
+ "recall": 0.303,
136
+ "test_rows": 5999,
137
+ "test_positives": 1327
138
+ },
139
+ "lead": "Tom Becker, AI Governance Lead",
140
+ "caio": "Anika Rao, Chief AI Officer",
141
+ "memo_ref": "Week 6 memo",
142
+ "monitoring_lines": [
143
+ "The calibration table by score band, predicted against observed default, every band within 25 percent (ruling 1).",
144
+ "The six status fields' distributions against the training file (ruling 6).",
145
+ "False alarm and contact rates by group, with under 25 and high school reviewed monthly by the AI Governance Office and Customer Advocacy (rulings 3 and 4)."
146
+ ],
147
+ "inputs": [
148
+ "LIMIT_BAL",
149
+ "BILL_AMT1",
150
+ "BILL_AMT2",
151
+ "BILL_AMT3",
152
+ "BILL_AMT4",
153
+ "BILL_AMT5",
154
+ "BILL_AMT6",
155
+ "PAY_AMT1",
156
+ "PAY_AMT2",
157
+ "PAY_AMT3",
158
+ "PAY_AMT4",
159
+ "PAY_AMT5",
160
+ "PAY_AMT6",
161
+ "STATUS_0",
162
+ "STATUS_2",
163
+ "STATUS_3",
164
+ "STATUS_4",
165
+ "STATUS_5",
166
+ "STATUS_6",
167
+ "PAID_1",
168
+ "PAID_2",
169
+ "PAID_3",
170
+ "PAID_4",
171
+ "PAID_5",
172
+ "UTIL_RECENT",
173
+ "PAY_RATIO_RECENT",
174
+ "SEX",
175
+ "AGE",
176
+ "MARRIAGE_MODEL",
177
+ "EDUCATION_MODEL"
178
+ ],
179
+ "categorical": [
180
+ "STATUS_0",
181
+ "STATUS_2",
182
+ "STATUS_3",
183
+ "STATUS_4",
184
+ "STATUS_5",
185
+ "STATUS_6",
186
+ "PAID_1",
187
+ "PAID_2",
188
+ "PAID_3",
189
+ "PAID_4",
190
+ "PAID_5",
191
+ "SEX",
192
+ "MARRIAGE_MODEL",
193
+ "EDUCATION_MODEL"
194
+ ],
195
+ "numeric": [
196
+ "LIMIT_BAL",
197
+ "BILL_AMT1",
198
+ "BILL_AMT2",
199
+ "BILL_AMT3",
200
+ "BILL_AMT4",
201
+ "BILL_AMT5",
202
+ "BILL_AMT6",
203
+ "PAY_AMT1",
204
+ "PAY_AMT2",
205
+ "PAY_AMT3",
206
+ "PAY_AMT4",
207
+ "PAY_AMT5",
208
+ "PAY_AMT6",
209
+ "UTIL_RECENT",
210
+ "PAY_RATIO_RECENT",
211
+ "AGE"
212
+ ],
213
+ "kept": [
214
+ "LIMIT_BAL",
215
+ "BILL_AMT1",
216
+ "BILL_AMT2",
217
+ "BILL_AMT3",
218
+ "BILL_AMT4",
219
+ "BILL_AMT5",
220
+ "BILL_AMT6",
221
+ "PAY_AMT1",
222
+ "PAY_AMT2",
223
+ "PAY_AMT3",
224
+ "PAY_AMT4",
225
+ "PAY_AMT5",
226
+ "PAY_AMT6",
227
+ "UTIL_RECENT",
228
+ "PAY_RATIO_RECENT",
229
+ "STATUS_0_delay of 1 month",
230
+ "STATUS_0_delay of 2 months",
231
+ "STATUS_0_delay of 3 months",
232
+ "STATUS_0_delay of 4 months",
233
+ "STATUS_0_delay of 5 months",
234
+ "STATUS_0_delay of 6 months",
235
+ "STATUS_0_delay of 7 months",
236
+ "STATUS_0_delay of 8 months",
237
+ "STATUS_0_no delinquency recorded, code undefined",
238
+ "STATUS_0_paid duly",
239
+ "STATUS_2_delay of 1 month",
240
+ "STATUS_2_delay of 2 months",
241
+ "STATUS_2_delay of 3 months",
242
+ "STATUS_2_delay of 4 months",
243
+ "STATUS_2_delay of 5 months",
244
+ "STATUS_2_delay of 6 months",
245
+ "STATUS_2_delay of 7 months",
246
+ "STATUS_2_delay of 8 months",
247
+ "STATUS_2_no delinquency recorded, code undefined",
248
+ "STATUS_2_paid duly",
249
+ "STATUS_3_delay of 1 month",
250
+ "STATUS_3_delay of 2 months",
251
+ "STATUS_3_delay of 3 months",
252
+ "STATUS_3_delay of 4 months",
253
+ "STATUS_3_delay of 5 months",
254
+ "STATUS_3_delay of 6 months",
255
+ "STATUS_3_delay of 7 months",
256
+ "STATUS_3_delay of 8 months",
257
+ "STATUS_3_no delinquency recorded, code undefined",
258
+ "STATUS_3_paid duly",
259
+ "STATUS_4_delay of 1 month",
260
+ "STATUS_4_delay of 2 months",
261
+ "STATUS_4_delay of 3 months",
262
+ "STATUS_4_delay of 4 months",
263
+ "STATUS_4_delay of 5 months",
264
+ "STATUS_4_delay of 6 months",
265
+ "STATUS_4_delay of 7 months",
266
+ "STATUS_4_delay of 8 months",
267
+ "STATUS_4_no delinquency recorded, code undefined",
268
+ "STATUS_4_paid duly",
269
+ "STATUS_5_delay of 2 months",
270
+ "STATUS_5_delay of 3 months",
271
+ "STATUS_5_delay of 4 months",
272
+ "STATUS_5_delay of 5 months",
273
+ "STATUS_5_delay of 6 months",
274
+ "STATUS_5_delay of 7 months",
275
+ "STATUS_5_delay of 8 months",
276
+ "STATUS_5_no delinquency recorded, code undefined",
277
+ "STATUS_5_paid duly",
278
+ "STATUS_6_delay of 2 months",
279
+ "STATUS_6_delay of 3 months",
280
+ "STATUS_6_delay of 4 months",
281
+ "STATUS_6_delay of 5 months",
282
+ "STATUS_6_delay of 6 months",
283
+ "STATUS_6_delay of 7 months",
284
+ "STATUS_6_delay of 8 months",
285
+ "STATUS_6_no delinquency recorded, code undefined",
286
+ "STATUS_6_paid duly",
287
+ "PAID_1_no balance",
288
+ "PAID_1_paid in full",
289
+ "PAID_1_paid nothing",
290
+ "PAID_1_paid part",
291
+ "PAID_2_no balance",
292
+ "PAID_2_paid in full",
293
+ "PAID_2_paid nothing",
294
+ "PAID_2_paid part",
295
+ "PAID_3_no balance",
296
+ "PAID_3_paid in full",
297
+ "PAID_3_paid nothing",
298
+ "PAID_3_paid part",
299
+ "PAID_4_no balance",
300
+ "PAID_4_paid in full",
301
+ "PAID_4_paid nothing",
302
+ "PAID_4_paid part",
303
+ "PAID_5_no balance",
304
+ "PAID_5_paid in full",
305
+ "PAID_5_paid nothing",
306
+ "PAID_5_paid part"
307
+ ],
308
+ "artifacts": {
309
+ "limitwise_v2.pkl": {
310
+ "bytes": 18636,
311
+ "sha256": "7842edc29acd316873ffa482db705ab2ea09427f8b4e1186436713d316de8ecb"
312
+ },
313
+ "limitwise_v2_recalibrated.pkl": {
314
+ "bytes": 89015,
315
+ "sha256": "b6508dfcc69ca108e3f08fc2be0843dab1d2517355970b8e622e52a34127ca37"
316
+ },
317
+ "reasons.csv": {
318
+ "bytes": 7799,
319
+ "sha256": "ab349230ee6c1a086e4a6f6b29d93e8dec6c58f084ccc27746f28def712998d2"
320
+ }
321
+ },
322
+ "weights": [
323
+ [
324
+ "STATUS_2_delay of 8 months",
325
+ -0.5039640072953564
326
+ ],
327
+ [
328
+ "STATUS_0_delay of 2 months",
329
+ 0.4551672900610481
330
+ ],
331
+ [
332
+ "STATUS_0_no delinquency recorded, code undefined",
333
+ -0.29541722019909206
334
+ ],
335
+ [
336
+ "BILL_AMT1",
337
+ -0.22289125235966772
338
+ ],
339
+ [
340
+ "BILL_AMT2",
341
+ 0.22269939355880997
342
+ ],
343
+ [
344
+ "LIMIT_BAL",
345
+ -0.18063967864614505
346
+ ],
347
+ [
348
+ "STATUS_3_delay of 6 months",
349
+ 0.17892881317393983
350
+ ],
351
+ [
352
+ "STATUS_3_delay of 1 month",
353
+ -0.1666802133117096
354
+ ],
355
+ [
356
+ "PAY_AMT1",
357
+ -0.16324871972903526
358
+ ],
359
+ [
360
+ "STATUS_5_delay of 7 months",
361
+ 0.15235838602958815
362
+ ],
363
+ [
364
+ "STATUS_4_delay of 1 month",
365
+ 0.14913252735793928
366
+ ],
367
+ [
368
+ "STATUS_4_delay of 7 months",
369
+ -0.14666812791171707
370
+ ],
371
+ [
372
+ "STATUS_0_delay of 3 months",
373
+ 0.1356422562245205
374
+ ],
375
+ [
376
+ "STATUS_4_delay of 5 months",
377
+ -0.13392612402039197
378
+ ],
379
+ [
380
+ "UTIL_RECENT",
381
+ 0.13305523853156798
382
+ ],
383
+ [
384
+ "PAY_AMT2",
385
+ -0.13110437667603564
386
+ ],
387
+ [
388
+ "STATUS_4_delay of 6 months",
389
+ -0.12287955895658455
390
+ ],
391
+ [
392
+ "PAID_3_paid nothing",
393
+ 0.11291845600022514
394
+ ],
395
+ [
396
+ "PAID_4_paid part",
397
+ -0.10724778099203863
398
+ ],
399
+ [
400
+ "BILL_AMT3",
401
+ 0.10585801079767654
402
+ ],
403
+ [
404
+ "PAID_4_no balance",
405
+ 0.10148095550974805
406
+ ],
407
+ [
408
+ "BILL_AMT6",
409
+ -0.09763006096339935
410
+ ],
411
+ [
412
+ "PAID_1_paid part",
413
+ -0.09056534286569744
414
+ ],
415
+ [
416
+ "PAID_5_paid in full",
417
+ -0.08923148289651153
418
+ ],
419
+ [
420
+ "STATUS_3_delay of 2 months",
421
+ 0.08860161441479777
422
+ ],
423
+ [
424
+ "STATUS_6_no delinquency recorded, code undefined",
425
+ -0.080771470924185
426
+ ],
427
+ [
428
+ "PAID_3_paid in full",
429
+ -0.07626009426053693
430
+ ],
431
+ [
432
+ "PAID_1_paid nothing",
433
+ 0.07073519837099726
434
+ ],
435
+ [
436
+ "BILL_AMT4",
437
+ 0.0677806743545396
438
+ ],
439
+ [
440
+ "STATUS_5_paid duly",
441
+ -0.06666764266580824
442
+ ],
443
+ [
444
+ "STATUS_5_delay of 2 months",
445
+ 0.06417630050812508
446
+ ],
447
+ [
448
+ "STATUS_3_paid duly",
449
+ -0.05855938417367776
450
+ ],
451
+ [
452
+ "PAID_5_paid nothing",
453
+ 0.05660922499989594
454
+ ],
455
+ [
456
+ "STATUS_2_paid duly",
457
+ -0.05575862688354833
458
+ ],
459
+ [
460
+ "STATUS_6_paid duly",
461
+ 0.051982154815802435
462
+ ],
463
+ [
464
+ "PAID_1_no balance",
465
+ 0.0514916828905529
466
+ ],
467
+ [
468
+ "STATUS_5_delay of 6 months",
469
+ 0.051270206053641826
470
+ ],
471
+ [
472
+ "PAID_2_paid nothing",
473
+ 0.04988887717888915
474
+ ],
475
+ [
476
+ "STATUS_4_delay of 2 months",
477
+ 0.04986130866939965
478
+ ],
479
+ [
480
+ "STATUS_6_delay of 3 months",
481
+ 0.048227639483102186
482
+ ],
483
+ [
484
+ "STATUS_2_delay of 7 months",
485
+ -0.046987798245092256
486
+ ],
487
+ [
488
+ "STATUS_0_delay of 1 month",
489
+ 0.04600743034304016
490
+ ],
491
+ [
492
+ "STATUS_0_delay of 4 months",
493
+ 0.04594619106710718
494
+ ],
495
+ [
496
+ "PAID_2_paid part",
497
+ -0.04515798904117099
498
+ ],
499
+ [
500
+ "STATUS_6_delay of 2 months",
501
+ 0.04299847088182787
502
+ ],
503
+ [
504
+ "STATUS_2_no delinquency recorded, code undefined",
505
+ 0.04256803115041107
506
+ ],
507
+ [
508
+ "STATUS_2_delay of 4 months",
509
+ -0.04245810777257909
510
+ ],
511
+ [
512
+ "PAID_5_paid part",
513
+ 0.04132424452731096
514
+ ],
515
+ [
516
+ "STATUS_0_paid duly",
517
+ -0.04040908259405443
518
+ ],
519
+ [
520
+ "STATUS_5_delay of 5 months",
521
+ 0.04029083926098087
522
+ ],
523
+ [
524
+ "STATUS_0_delay of 8 months",
525
+ -0.03989328482470391
526
+ ],
527
+ [
528
+ "PAID_4_paid nothing",
529
+ 0.030239839152150578
530
+ ],
531
+ [
532
+ "PAID_2_no balance",
533
+ 0.029314204273452448
534
+ ],
535
+ [
536
+ "STATUS_0_delay of 7 months",
537
+ 0.027682360024328365
538
+ ],
539
+ [
540
+ "BILL_AMT5",
541
+ 0.02610742724500418
542
+ ],
543
+ [
544
+ "STATUS_2_delay of 2 months",
545
+ 0.025343683133782442
546
+ ],
547
+ [
548
+ "STATUS_6_delay of 7 months",
549
+ -0.025146023500980816
550
+ ],
551
+ [
552
+ "STATUS_4_no delinquency recorded, code undefined",
553
+ -0.02296436281798626
554
+ ],
555
+ [
556
+ "PAID_1_paid in full",
557
+ 0.022724009839817483
558
+ ],
559
+ [
560
+ "PAID_4_paid in full",
561
+ 0.02245439367494789
562
+ ],
563
+ [
564
+ "STATUS_3_no delinquency recorded, code undefined",
565
+ -0.021565816950964413
566
+ ],
567
+ [
568
+ "STATUS_4_paid duly",
569
+ 0.020762235068190773
570
+ ],
571
+ [
572
+ "STATUS_6_delay of 4 months",
573
+ 0.019296387292338728
574
+ ],
575
+ [
576
+ "STATUS_4_delay of 3 months",
577
+ -0.019237043787947525
578
+ ],
579
+ [
580
+ "STATUS_2_delay of 1 month",
581
+ -0.01721996140750323
582
+ ],
583
+ [
584
+ "STATUS_5_delay of 4 months",
585
+ -0.016779851753297246
586
+ ],
587
+ [
588
+ "STATUS_3_delay of 3 months",
589
+ 0.016488680440516868
590
+ ],
591
+ [
592
+ "STATUS_2_delay of 5 months",
593
+ 0.014957419929230715
594
+ ],
595
+ [
596
+ "PAY_RATIO_RECENT",
597
+ -0.014744579451479636
598
+ ],
599
+ [
600
+ "STATUS_6_delay of 6 months",
601
+ 0.013758271323696863
602
+ ],
603
+ [
604
+ "PAID_3_no balance",
605
+ -0.013308180673404297
606
+ ],
607
+ [
608
+ "PAY_AMT4",
609
+ -0.011886073604529012
610
+ ],
611
+ [
612
+ "STATUS_3_delay of 4 months",
613
+ -0.011652950713743126
614
+ ],
615
+ [
616
+ "PAID_3_paid part",
617
+ 0.011198663075826232
618
+ ],
619
+ [
620
+ "STATUS_3_delay of 5 months",
621
+ -0.010570088837797562
622
+ ],
623
+ [
624
+ "PAY_AMT6",
625
+ -0.010199223770709179
626
+ ],
627
+ [
628
+ "PAY_AMT5",
629
+ -0.010192317105689951
630
+ ],
631
+ [
632
+ "STATUS_5_delay of 3 months",
633
+ -0.008719319679223644
634
+ ],
635
+ [
636
+ "STATUS_2_delay of 6 months",
637
+ -0.0066645897593760675
638
+ ],
639
+ [
640
+ "PAY_AMT3",
641
+ -0.005409485111934878
642
+ ],
643
+ [
644
+ "STATUS_2_delay of 3 months",
645
+ 0.0053150067807837854
646
+ ],
647
+ [
648
+ "STATUS_4_delay of 8 months",
649
+ 0.005105130451058765
650
+ ],
651
+ [
652
+ "STATUS_5_delay of 8 months",
653
+ 0.005105130451058765
654
+ ],
655
+ [
656
+ "STATUS_6_delay of 8 months",
657
+ 0.005105130451058765
658
+ ],
659
+ [
660
+ "STATUS_4_delay of 4 months",
661
+ -0.003551067523748044
662
+ ],
663
+ [
664
+ "PAID_5_no balance",
665
+ 0.003222446885544461
666
+ ],
667
+ [
668
+ "STATUS_0_delay of 5 months",
669
+ 0.003219742087970856
670
+ ],
671
+ [
672
+ "STATUS_6_delay of 5 months",
673
+ 0.002269724948883509
674
+ ],
675
+ [
676
+ "STATUS_5_no delinquency recorded, code undefined",
677
+ 0.002162756013280376
678
+ ],
679
+ [
680
+ "STATUS_3_delay of 7 months",
681
+ -0.0006486499754519148
682
+ ],
683
+ [
684
+ "PAID_2_paid in full",
685
+ -0.00031853069544259726
686
+ ],
687
+ [
688
+ "STATUS_0_delay of 6 months",
689
+ -0.0003018817489643535
690
+ ],
691
+ [
692
+ "STATUS_3_delay of 8 months",
693
+ -0.0001632838231806132
694
+ ]
695
+ ],
696
+ "intercept": -0.2309387424099975,
697
+ "data_url": "https://huggingface.co/datasets/drdavidprivacy/practicum-case-packs/resolve/main/corvana_modeling_extract_remediated.csv",
698
+ "dataset_repo": "https://huggingface.co/datasets/drdavidprivacy/practicum-case-packs",
699
+ "versions": {
700
+ "sklearn": "1.9.1",
701
+ "fairlearn": "0.15.0",
702
+ "pandas": "3.0.5",
703
+ "numpy": "2.5.3"
704
+ },
705
+ "docs": [
706
+ [
707
+ "01_Use-Case-Assessment.pdf",
708
+ "Use Case Assessment (Week 1)"
709
+ ],
710
+ [
711
+ "02_EDA-Observation-Log.pdf",
712
+ "EDA Observation Log (Week 2)"
713
+ ],
714
+ [
715
+ "03_Dataset-Datasheet.pdf",
716
+ "Dataset Datasheet (Week 3)"
717
+ ],
718
+ [
719
+ "04_Model-Selection-Rationale.pdf",
720
+ "Model Selection Rationale (Week 4)"
721
+ ],
722
+ [
723
+ "05_Model-Card.pdf",
724
+ "Model Card (Week 6)"
725
+ ],
726
+ [
727
+ "06_Go-No-Go-Decision-Record.pdf",
728
+ "Go/No-Go Decision Record (Week 7)"
729
+ ]
730
+ ],
731
+ "reference_label": "the Week 6 test set reweighted to the 3 percent book rate",
732
+ "reference_note": "The reference file is the Week 6 test set reweighted to the bank's book rate, the way the Week 6 calibration check reweighted it: every paying account counted four times and 578 defaulters once, so the file defaults at 3.0 percent, as the book does. The Week 6 cut is the score of the last account inside the top 10 percent of that file, which is the queue the record approved."
733
+ }