Spaces:
Sleeping
Sleeping
Upload 13 files
Browse files- README.md +15 -15
- app.py +99 -113
- limitwise_month_1.csv +0 -0
- limitwise_month_2.csv +0 -0
- limitwise_month_3.csv +0 -0
- limitwise_reference.csv +0 -0
- limitwise_v2.pkl +1 -1
- requirements.txt +1 -0
- space_config.json +100 -95
README.md
CHANGED
|
@@ -14,42 +14,42 @@ models:
|
|
| 14 |
datasets:
|
| 15 |
- drdavidprivacy/limitwise-data
|
| 16 |
- drdavidprivacy/practicum-case-packs
|
| 17 |
-
short_description: LimitWise v2, the signed model and its
|
| 18 |
---
|
| 19 |
|
| 20 |
# LimitWise v2: Corvana Bank
|
| 21 |
|
| 22 |
-
**Governance
|
| 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
|
| 27 |
|
| 28 |
## The signed version
|
| 29 |
|
| 30 |
-
- File: `limitwise_v2.pkl`, 18,636 bytes, SHA-256 `
|
| 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 |
-
|
| 38 |
|
| 39 |
-
|
|
|
|
| 40 |
|
| 41 |
-
The
|
| 42 |
-
|
| 43 |
-
-
|
| 44 |
-
-
|
| 45 |
-
-
|
| 46 |
-
-
|
| 47 |
-
- [Go/No-Go Decision Record (Week 7)](docs/06_Go-No-Go-Decision-Record.pdf)
|
| 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
|
| 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
|
|
|
|
| 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, the file every month is read against.
|
| 40 |
+
- `limitwise_month_1.csv`, `_month_2.csv`, `_month_3.csv`: three monthly files. One has no drift, one has input drift the model shrugs off, one has input drift that moves the scores and the outcomes. Tab 3 runs Evidently's data-drift report on any of them, or on a file of your own.
|
| 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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
"""The public page of a governed system: the signed model, its monitoring page, and the
|
| 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
|
|
@@ -26,7 +26,6 @@ RECAL = pickle.load(open(os.path.join(HERE, CFG["recal_file"]), "rb")) if CFG.ge
|
|
| 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 |
-
CAL_FLOOR = 25 # a calibration band is read only when it expects at least this many outcomes; a smaller band says nothing either way
|
| 30 |
SPACE_ID = os.environ.get("SPACE_ID", "")
|
| 31 |
WEEK6 = CFG["week6"]
|
| 32 |
|
|
@@ -66,13 +65,20 @@ def readable(col):
|
|
| 66 |
if col.startswith(c + "_"): return f"{c} is {col[len(c) + 1:]}"
|
| 67 |
return col
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
def coerce(df):
|
| 70 |
-
"""Read a file the way the working file
|
|
|
|
| 71 |
df = df.copy()
|
| 72 |
for c in CFG["numeric"]:
|
| 73 |
if c in df: df[c] = pd.to_numeric(df[c], errors="coerce")
|
| 74 |
for c in CFG["categorical"]:
|
| 75 |
-
if c in df: df[c] = df[c].astype(str)
|
| 76 |
return df
|
| 77 |
|
| 78 |
def groups_of(frame):
|
|
@@ -180,110 +186,90 @@ def score_batch(file, top_n):
|
|
| 180 |
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.")
|
| 181 |
return out.head(int(top_n)), msg, path
|
| 182 |
|
| 183 |
-
# ----------------------------------------------------------------------------- tab
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
if c in
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
L = [f"**
|
| 260 |
-
f"**Scores:** mean {s.mean():.4f} (training-file positive rate {pct(REF['positive_rate'])}). {pct(above_cut)} of this file scores above the Week 6 cut of {REF['cut_score']:.4f}, against {pct(SHARE, 0)} by construction on the test set. The top {int(SHARE*100)} percent of this file is {k:,} {CFG['units']}.",
|
| 261 |
-
f"**Inputs:** the stability index compares each input's distribution with the training file's ({REF['rows']:,} rows). Under 0.10 is stable, 0.10 to 0.25 is watch, over 0.25 is shifted. These lines are the usual working lines, provisional until the Week 8 monitoring plan sets the program's own. Watched fields: {CFG['watch_fields_label']}."]
|
| 262 |
-
if y is not None:
|
| 263 |
-
pos = y == 1
|
| 264 |
-
L.append(f"**At the cut:** {int((flag & pos).sum()):,} of the {int(pos.sum()):,} {CFG['positive_label']} {CFG['units']} are ranked in ({pct((flag & pos).sum() / max(pos.sum(), 1))}); the whole-file {'false alarm' if CFG['group_check'] == 'false_alarm' else 'miss'} rate is the line every group is read against, plus {int(CFG['group_tripwire']*100)} percent ({CFG['memo_ref']}).")
|
| 265 |
-
cal = calibration_table(s, y) if (CFG.get("calibration") and y is not None) else None
|
| 266 |
-
if cal is not None:
|
| 267 |
-
worst = [r for r in cal.result if r == "TRIP"]; read = [r for r in cal.result if r in ("TRIP", "pass")]
|
| 268 |
-
L.append(f"**Calibration:** predicted against observed by score band, line {int(CFG['calibration']['tripwire']*100)} percent of observed. Bands that expect fewer than {CAL_FLOOR} outcomes are not read. " + (f"{len(read)} band(s) read, every one inside the line." if not worst else f"{len(worst)} of {len(read)} band(s) read are over the line: the calibration condition (ruling 1) is not met for this file."))
|
| 269 |
-
return "\n\n".join(L), drift_table(df), group_table(df, s, flag, y), cal
|
| 270 |
-
|
| 271 |
-
# ----------------------------------------------------------------------------- tab 4: the dossier
|
| 272 |
-
def dossier_markdown():
|
| 273 |
-
L = [f"## The dossier: {CFG['system']} at {CFG['org']}", "", "The six deliverables of the practicum, in course order. Each opens in the browser.", ""]
|
| 274 |
-
for f, label in CFG["docs"]:
|
| 275 |
-
p = os.path.join(HERE, "docs", f)
|
| 276 |
-
if SPACE_ID: url = f"https://huggingface.co/spaces/{SPACE_ID}/resolve/main/docs/{f}"
|
| 277 |
-
else: url = f"docs/{f}"
|
| 278 |
-
L.append(f"- [{label}]({url})" + ("" if os.path.exists(p) else " (not uploaded yet)"))
|
| 279 |
-
L += ["", f"**Monitoring targets from the {CFG['memo_ref']}:**"] + [f"- {m}" for m in CFG["monitoring_lines"]]
|
| 280 |
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."]
|
| 281 |
return "\n".join(L)
|
| 282 |
|
| 283 |
# ----------------------------------------------------------------------------- the page
|
| 284 |
INTRO = f"""
|
| 285 |
# {CFG['system']} {CFG['version']}: {CFG['org']}
|
| 286 |
-
**
|
| 287 |
|
| 288 |
---
|
| 289 |
|
|
@@ -320,7 +306,7 @@ with gr.Blocks(title=f"{CFG['org']} {CFG['system']}") as demo:
|
|
| 320 |
score_btn.click(score_one, ordered, [out_md, out_plot])
|
| 321 |
|
| 322 |
with gr.Tab("2 · Batch upload"):
|
| 323 |
-
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. `
|
| 324 |
with gr.Row():
|
| 325 |
up = gr.File(label=f"{CFG['units'].capitalize()} CSV", file_types=[".csv"])
|
| 326 |
with gr.Column():
|
|
@@ -330,17 +316,17 @@ with gr.Blocks(title=f"{CFG['org']} {CFG['system']}") as demo:
|
|
| 330 |
batch_btn.click(score_batch, [up, topn], [batch_tbl, batch_msg, batch_dl])
|
| 331 |
|
| 332 |
with gr.Tab("3 · Monitoring"):
|
| 333 |
-
gr.Markdown(f"**One month at a time.**
|
| 334 |
-
|
| 335 |
-
|
|
|
|
|
|
|
| 336 |
m_msg = gr.Markdown()
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
with gr.Tab("4 · The dossier"):
|
| 343 |
-
gr.Markdown(dossier_markdown())
|
| 344 |
|
| 345 |
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']}).*")
|
| 346 |
|
|
|
|
| 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
|
|
|
|
| 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 |
|
|
|
|
| 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):
|
|
|
|
| 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) if os.path.exists(os.path.join(HERE, f"{CFG['short']}_month_{i}.csv"))}
|
| 193 |
+
SCORE_COL, FLAG_COL = "predicted_score", "flagged"
|
| 194 |
+
|
| 195 |
+
def monitoring_frame(df):
|
| 196 |
+
"""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."""
|
| 197 |
+
df = coerce(df); out = pd.DataFrame(index=df.index)
|
| 198 |
+
skip = {CFG.get("id_col")} | {SCORE_COL, FLAG_COL}
|
| 199 |
+
num, cat = [], []
|
| 200 |
+
for c in df.columns:
|
| 201 |
+
if c in skip or c is None: continue
|
| 202 |
+
if c in CFG["numeric"] or (c not in CFG["categorical"] and pd.api.types.is_numeric_dtype(df[c]) and c != CFG["outcome"]):
|
| 203 |
+
out[c] = pd.to_numeric(df[c], errors="coerce").astype("float64").to_numpy(); num.append(c)
|
| 204 |
+
else:
|
| 205 |
+
out[c] = df[c].astype(str).to_numpy().astype(object); cat.append(c)
|
| 206 |
+
s = score_frame(df); out[SCORE_COL] = s.astype("float64"); num.append(SCORE_COL)
|
| 207 |
+
out[FLAG_COL] = np.where(s >= REF["cut_score"], "flagged", "not flagged").astype(object); cat.append(FLAG_COL)
|
| 208 |
+
return out, num, cat
|
| 209 |
+
|
| 210 |
+
def monitor(choice, file):
|
| 211 |
+
"""Run Evidently's data-drift report for one month against the reference file, and summarize the three signals above it."""
|
| 212 |
+
if file is not None:
|
| 213 |
+
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"
|
| 214 |
+
except Exception as e: return f"Could not read the file: {e}", "", None
|
| 215 |
+
elif choice in MONTHS:
|
| 216 |
+
cur = pd.read_csv(os.path.join(HERE, MONTHS[choice]), low_memory=False, keep_default_na=False, na_values=[]); label = choice
|
| 217 |
+
else:
|
| 218 |
+
return "Pick a month, or upload a file.", "", None
|
| 219 |
+
missing = [c for c in INPUTS if c not in cur.columns]
|
| 220 |
+
if missing: return "The file is missing input columns: " + ", ".join(missing) + ". Nothing was read.", "", None
|
| 221 |
+
from evidently import Dataset, DataDefinition, Report
|
| 222 |
+
from evidently.presets import DataDriftPreset
|
| 223 |
+
ref_f, num, cat = monitoring_frame(REFERENCE)
|
| 224 |
+
cur_f, num_c, cat_c = monitoring_frame(cur)
|
| 225 |
+
cols = [c for c in ref_f.columns if c in cur_f.columns]
|
| 226 |
+
num = [c for c in num if c in cols]; cat = [c for c in cat if c in cols]
|
| 227 |
+
dd = DataDefinition(numerical_columns=num, categorical_columns=cat)
|
| 228 |
+
# two-sided proportion test for the yes/no columns (the flag and the outcome), where a distance score reads a real shift as small
|
| 229 |
+
binary = [c for c in (FLAG_COL, CFG["outcome"]) if c in cat]
|
| 230 |
+
preset = DataDriftPreset(per_column_method={c: "z" for c in binary}, per_column_threshold={c: 0.05 for c in binary})
|
| 231 |
+
snap = Report([preset]).run(Dataset.from_pandas(cur_f[cols], data_definition=dd), Dataset.from_pandas(ref_f[cols], data_definition=dd))
|
| 232 |
+
ms = snap.dict()["metrics"]
|
| 233 |
+
def is_drift(m):
|
| 234 |
+
c = m.get("config", {}); col = c.get("column")
|
| 235 |
+
if not col: return False
|
| 236 |
+
if col in binary: return float(m["value"]) < c.get("threshold", 0.05) # a p-value
|
| 237 |
+
return float(m["value"]) > c.get("threshold", 0.1) # a distance
|
| 238 |
+
drifted = [m["config"]["column"] for m in ms[1:] if is_drift(m)]
|
| 239 |
+
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"])]
|
| 240 |
+
s_ref, s_cur = ref_f[SCORE_COL].values, cur_f[SCORE_COL].values
|
| 241 |
+
f_ref, f_cur = float((s_ref >= REF["cut_score"]).mean()), float((s_cur >= REF["cut_score"]).mean())
|
| 242 |
+
L = [f"**{label}:** {len(cur):,} {CFG['units']} read against the reference file ({len(REFERENCE):,} {CFG['units']}, 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.", ""]
|
| 243 |
+
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 ""))
|
| 244 |
+
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."))
|
| 245 |
+
if CFG["outcome"] in cur.columns:
|
| 246 |
+
o_ref = float((REFERENCE[CFG["outcome"]].astype(str) == str(CFG["positive"])).mean()); o_cur = float((cur[CFG["outcome"]].astype(str) == str(CFG["positive"])).mean())
|
| 247 |
+
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."))
|
| 248 |
+
else:
|
| 249 |
+
L.append("**The outcomes.** This file carries no outcome column, so label drift cannot be read yet.")
|
| 250 |
+
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.")
|
| 251 |
+
report_html = snap.get_html_str(as_iframe=False)
|
| 252 |
+
path = os.path.join("/tmp", f"{CFG['short']}_{label.replace(' ', '_')}_evidently_report.html"); open(path, "w", encoding="utf-8").write(report_html)
|
| 253 |
+
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>'
|
| 254 |
+
return "\n".join(L), frame, path
|
| 255 |
+
|
| 256 |
+
# ----------------------------------------------------------------------------- tab 4: the repositories
|
| 257 |
+
def repositories_markdown():
|
| 258 |
+
short = CFG["short"]
|
| 259 |
+
L = [f"## The repositories: {CFG['system']} at {CFG['org']}", "",
|
| 260 |
+
"A governed system leaves its record in several places, and this page is only one of them. Each link opens on Hugging Face.", "",
|
| 261 |
+
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.",
|
| 262 |
+
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.",
|
| 263 |
+
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.",
|
| 264 |
+
f"- **Collection**, [{CFG['collection_name']}]({CFG['collection_url']}): all of the above in one place.", ""]
|
| 265 |
+
L += [f"**Monitoring targets from the {CFG['memo_ref']}:**"] + [f"- {m}" for m in CFG["monitoring_lines"]]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 266 |
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."]
|
| 267 |
return "\n".join(L)
|
| 268 |
|
| 269 |
# ----------------------------------------------------------------------------- the page
|
| 270 |
INTRO = f"""
|
| 271 |
# {CFG['system']} {CFG['version']}: {CFG['org']}
|
| 272 |
+
**Kept by: {CFG['lead']}** · a teaching deployment for the *AI Governance Practicum*, Track 1
|
| 273 |
|
| 274 |
---
|
| 275 |
|
|
|
|
| 306 |
score_btn.click(score_one, ordered, [out_md, out_plot])
|
| 307 |
|
| 308 |
with gr.Tab("2 · Batch upload"):
|
| 309 |
+
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.")
|
| 310 |
with gr.Row():
|
| 311 |
up = gr.File(label=f"{CFG['units'].capitalize()} CSV", file_types=[".csv"])
|
| 312 |
with gr.Column():
|
|
|
|
| 316 |
batch_btn.click(score_batch, [up, topn], [batch_tbl, batch_msg, batch_dl])
|
| 317 |
|
| 318 |
with gr.Tab("3 · Monitoring"):
|
| 319 |
+
gr.Markdown(f"**One month at a time.** Pick one of the three monthly files, or upload a file of your own, and read it against the reference file (the Week 6 test set). The page scores every row with the signed version and runs Evidently's data-drift report: every column in the file, the model's score, and the flag at the Week 6 cut. The three files and the reference are in this repository's Files tab (`{CFG['short']}_reference.csv`, `{CFG['short']}_month_1.csv` to `_3.csv`).")
|
| 320 |
+
with gr.Row():
|
| 321 |
+
m_choice = gr.Dropdown(choices=list(MONTHS), value=(list(MONTHS)[0] if MONTHS else None), label="Monthly file")
|
| 322 |
+
mf = gr.File(label="Or upload a file of your own (CSV)", file_types=[".csv"])
|
| 323 |
+
mon_btn = gr.Button("Run the monitoring report", variant="primary")
|
| 324 |
m_msg = gr.Markdown()
|
| 325 |
+
m_dl = gr.File(label="Download the report (HTML)")
|
| 326 |
+
m_html = gr.HTML()
|
| 327 |
+
mon_btn.click(monitor, [m_choice, mf], [m_msg, m_html, m_dl])
|
| 328 |
+
with gr.Tab("4 · The repositories"):
|
| 329 |
+
gr.Markdown(repositories_markdown())
|
|
|
|
|
|
|
| 330 |
|
| 331 |
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']}).*")
|
| 332 |
|
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_reference.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
limitwise_v2.pkl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 18636
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7842edc29acd316873ffa482db705ab2ea09427f8b4e1186436713d316de8ecb
|
| 3 |
size 18636
|
requirements.txt
CHANGED
|
@@ -5,3 +5,4 @@ pandas>=2.2
|
|
| 5 |
numpy>=1.26
|
| 6 |
scipy>=1.11
|
| 7 |
matplotlib>=3.8
|
|
|
|
|
|
| 5 |
numpy>=1.26
|
| 6 |
scipy>=1.11
|
| 7 |
matplotlib>=3.8
|
| 8 |
+
evidently==0.7.23
|
space_config.json
CHANGED
|
@@ -4,6 +4,9 @@
|
|
| 4 |
"version": "v2",
|
| 5 |
"short": "limitwise",
|
| 6 |
"emoji": "\ud83d\udcb3",
|
|
|
|
|
|
|
|
|
|
| 7 |
"model_file": "limitwise_v2.pkl",
|
| 8 |
"recal_file": "limitwise_v2_recalibrated.pkl",
|
| 9 |
"odds_factor": 0.1089,
|
|
@@ -24,6 +27,8 @@
|
|
| 24 |
"book_size": 4600000,
|
| 25 |
"capacity": 460000,
|
| 26 |
"sample_rows": 4500,
|
|
|
|
|
|
|
| 27 |
"groups": {
|
| 28 |
"sex": {
|
| 29 |
"col": "SEX",
|
|
@@ -303,7 +308,7 @@
|
|
| 303 |
"artifacts": {
|
| 304 |
"limitwise_v2.pkl": {
|
| 305 |
"bytes": 18636,
|
| 306 |
-
"sha256": "
|
| 307 |
},
|
| 308 |
"limitwise_v2_recalibrated.pkl": {
|
| 309 |
"bytes": 89015,
|
|
@@ -317,378 +322,378 @@
|
|
| 317 |
"weights": [
|
| 318 |
[
|
| 319 |
"STATUS_2_delay of 8 months",
|
| 320 |
-
-0.
|
| 321 |
],
|
| 322 |
[
|
| 323 |
"STATUS_0_delay of 2 months",
|
| 324 |
-
0.
|
| 325 |
],
|
| 326 |
[
|
| 327 |
"STATUS_0_no delinquency recorded, code undefined",
|
| 328 |
-
-0.
|
| 329 |
],
|
| 330 |
[
|
| 331 |
"BILL_AMT1",
|
| 332 |
-
-0.
|
| 333 |
],
|
| 334 |
[
|
| 335 |
"BILL_AMT2",
|
| 336 |
-
0.
|
| 337 |
],
|
| 338 |
[
|
| 339 |
"LIMIT_BAL",
|
| 340 |
-
-0.
|
| 341 |
],
|
| 342 |
[
|
| 343 |
"STATUS_3_delay of 6 months",
|
| 344 |
-
0.
|
| 345 |
],
|
| 346 |
[
|
| 347 |
"STATUS_3_delay of 1 month",
|
| 348 |
-
-0.
|
| 349 |
],
|
| 350 |
[
|
| 351 |
"PAY_AMT1",
|
| 352 |
-
-0.
|
| 353 |
],
|
| 354 |
[
|
| 355 |
"STATUS_5_delay of 7 months",
|
| 356 |
-
0.
|
| 357 |
],
|
| 358 |
[
|
| 359 |
"STATUS_4_delay of 1 month",
|
| 360 |
-
0.
|
| 361 |
],
|
| 362 |
[
|
| 363 |
"STATUS_4_delay of 7 months",
|
| 364 |
-
-0.
|
| 365 |
],
|
| 366 |
[
|
| 367 |
"STATUS_0_delay of 3 months",
|
| 368 |
-
0.
|
| 369 |
],
|
| 370 |
[
|
| 371 |
"STATUS_4_delay of 5 months",
|
| 372 |
-
-0.
|
| 373 |
],
|
| 374 |
[
|
| 375 |
"UTIL_RECENT",
|
| 376 |
-
0.
|
| 377 |
],
|
| 378 |
[
|
| 379 |
"PAY_AMT2",
|
| 380 |
-
-0.
|
| 381 |
],
|
| 382 |
[
|
| 383 |
"STATUS_4_delay of 6 months",
|
| 384 |
-
-0.
|
| 385 |
],
|
| 386 |
[
|
| 387 |
"PAID_3_paid nothing",
|
| 388 |
-
0.
|
| 389 |
],
|
| 390 |
[
|
| 391 |
"PAID_4_paid part",
|
| 392 |
-
-0.
|
| 393 |
],
|
| 394 |
[
|
| 395 |
"BILL_AMT3",
|
| 396 |
-
0.
|
| 397 |
],
|
| 398 |
[
|
| 399 |
"PAID_4_no balance",
|
| 400 |
-
0.
|
| 401 |
],
|
| 402 |
[
|
| 403 |
"BILL_AMT6",
|
| 404 |
-
-0.
|
| 405 |
],
|
| 406 |
[
|
| 407 |
"PAID_1_paid part",
|
| 408 |
-
-0.
|
| 409 |
],
|
| 410 |
[
|
| 411 |
"PAID_5_paid in full",
|
| 412 |
-
-0.
|
| 413 |
],
|
| 414 |
[
|
| 415 |
"STATUS_3_delay of 2 months",
|
| 416 |
-
0.
|
| 417 |
],
|
| 418 |
[
|
| 419 |
"STATUS_6_no delinquency recorded, code undefined",
|
| 420 |
-
-0.
|
| 421 |
],
|
| 422 |
[
|
| 423 |
"PAID_3_paid in full",
|
| 424 |
-
-0.
|
| 425 |
],
|
| 426 |
[
|
| 427 |
"PAID_1_paid nothing",
|
| 428 |
-
0.
|
| 429 |
],
|
| 430 |
[
|
| 431 |
"BILL_AMT4",
|
| 432 |
-
0.
|
| 433 |
],
|
| 434 |
[
|
| 435 |
"STATUS_5_paid duly",
|
| 436 |
-
-0.
|
| 437 |
],
|
| 438 |
[
|
| 439 |
"STATUS_5_delay of 2 months",
|
| 440 |
-
0.
|
| 441 |
],
|
| 442 |
[
|
| 443 |
"STATUS_3_paid duly",
|
| 444 |
-
-0.
|
| 445 |
],
|
| 446 |
[
|
| 447 |
"PAID_5_paid nothing",
|
| 448 |
-
0.
|
| 449 |
],
|
| 450 |
[
|
| 451 |
"STATUS_2_paid duly",
|
| 452 |
-
-0.
|
| 453 |
],
|
| 454 |
[
|
| 455 |
"STATUS_6_paid duly",
|
| 456 |
-
0.
|
| 457 |
],
|
| 458 |
[
|
| 459 |
"PAID_1_no balance",
|
| 460 |
-
0.
|
| 461 |
],
|
| 462 |
[
|
| 463 |
"STATUS_5_delay of 6 months",
|
| 464 |
-
0.
|
| 465 |
],
|
| 466 |
[
|
| 467 |
"PAID_2_paid nothing",
|
| 468 |
-
0.
|
| 469 |
],
|
| 470 |
[
|
| 471 |
"STATUS_4_delay of 2 months",
|
| 472 |
-
0.
|
| 473 |
],
|
| 474 |
[
|
| 475 |
"STATUS_6_delay of 3 months",
|
| 476 |
-
0.
|
| 477 |
],
|
| 478 |
[
|
| 479 |
"STATUS_2_delay of 7 months",
|
| 480 |
-
-0.
|
| 481 |
],
|
| 482 |
[
|
| 483 |
"STATUS_0_delay of 1 month",
|
| 484 |
-
0.
|
| 485 |
],
|
| 486 |
[
|
| 487 |
"STATUS_0_delay of 4 months",
|
| 488 |
-
0.
|
| 489 |
],
|
| 490 |
[
|
| 491 |
"PAID_2_paid part",
|
| 492 |
-
-0.
|
| 493 |
],
|
| 494 |
[
|
| 495 |
"STATUS_6_delay of 2 months",
|
| 496 |
-
0.
|
| 497 |
],
|
| 498 |
[
|
| 499 |
"STATUS_2_no delinquency recorded, code undefined",
|
| 500 |
-
0.
|
| 501 |
],
|
| 502 |
[
|
| 503 |
"STATUS_2_delay of 4 months",
|
| 504 |
-
-0.
|
| 505 |
],
|
| 506 |
[
|
| 507 |
"PAID_5_paid part",
|
| 508 |
-
0.
|
| 509 |
],
|
| 510 |
[
|
| 511 |
"STATUS_0_paid duly",
|
| 512 |
-
-0.
|
| 513 |
],
|
| 514 |
[
|
| 515 |
"STATUS_5_delay of 5 months",
|
| 516 |
-
0.
|
| 517 |
],
|
| 518 |
[
|
| 519 |
"STATUS_0_delay of 8 months",
|
| 520 |
-
-0.
|
| 521 |
],
|
| 522 |
[
|
| 523 |
"PAID_4_paid nothing",
|
| 524 |
-
0.
|
| 525 |
],
|
| 526 |
[
|
| 527 |
"PAID_2_no balance",
|
| 528 |
-
0.
|
| 529 |
],
|
| 530 |
[
|
| 531 |
"STATUS_0_delay of 7 months",
|
| 532 |
-
0.
|
| 533 |
],
|
| 534 |
[
|
| 535 |
"BILL_AMT5",
|
| 536 |
-
0.
|
| 537 |
],
|
| 538 |
[
|
| 539 |
"STATUS_2_delay of 2 months",
|
| 540 |
-
0.
|
| 541 |
],
|
| 542 |
[
|
| 543 |
"STATUS_6_delay of 7 months",
|
| 544 |
-
-0.
|
| 545 |
],
|
| 546 |
[
|
| 547 |
"STATUS_4_no delinquency recorded, code undefined",
|
| 548 |
-
-0.
|
| 549 |
],
|
| 550 |
[
|
| 551 |
"PAID_1_paid in full",
|
| 552 |
-
0.
|
| 553 |
],
|
| 554 |
[
|
| 555 |
"PAID_4_paid in full",
|
| 556 |
-
0.
|
| 557 |
],
|
| 558 |
[
|
| 559 |
"STATUS_3_no delinquency recorded, code undefined",
|
| 560 |
-
-0.
|
| 561 |
],
|
| 562 |
[
|
| 563 |
"STATUS_4_paid duly",
|
| 564 |
-
0.
|
| 565 |
],
|
| 566 |
[
|
| 567 |
"STATUS_6_delay of 4 months",
|
| 568 |
-
0.
|
| 569 |
],
|
| 570 |
[
|
| 571 |
"STATUS_4_delay of 3 months",
|
| 572 |
-
-0.
|
| 573 |
],
|
| 574 |
[
|
| 575 |
"STATUS_2_delay of 1 month",
|
| 576 |
-
-0.
|
| 577 |
],
|
| 578 |
[
|
| 579 |
"STATUS_5_delay of 4 months",
|
| 580 |
-
-0.
|
| 581 |
],
|
| 582 |
[
|
| 583 |
"STATUS_3_delay of 3 months",
|
| 584 |
-
0.
|
| 585 |
],
|
| 586 |
[
|
| 587 |
"STATUS_2_delay of 5 months",
|
| 588 |
-
0.
|
| 589 |
],
|
| 590 |
[
|
| 591 |
"PAY_RATIO_RECENT",
|
| 592 |
-
-0.
|
| 593 |
],
|
| 594 |
[
|
| 595 |
"STATUS_6_delay of 6 months",
|
| 596 |
-
0.
|
| 597 |
],
|
| 598 |
[
|
| 599 |
"PAID_3_no balance",
|
| 600 |
-
-0.
|
| 601 |
],
|
| 602 |
[
|
| 603 |
"PAY_AMT4",
|
| 604 |
-
-0.
|
| 605 |
],
|
| 606 |
[
|
| 607 |
"STATUS_3_delay of 4 months",
|
| 608 |
-
-0.
|
| 609 |
],
|
| 610 |
[
|
| 611 |
"PAID_3_paid part",
|
| 612 |
-
0.
|
| 613 |
],
|
| 614 |
[
|
| 615 |
"STATUS_3_delay of 5 months",
|
| 616 |
-
-0.
|
| 617 |
],
|
| 618 |
[
|
| 619 |
"PAY_AMT6",
|
| 620 |
-
-0.
|
| 621 |
],
|
| 622 |
[
|
| 623 |
"PAY_AMT5",
|
| 624 |
-
-0.
|
| 625 |
],
|
| 626 |
[
|
| 627 |
"STATUS_5_delay of 3 months",
|
| 628 |
-
-0.
|
| 629 |
],
|
| 630 |
[
|
| 631 |
"STATUS_2_delay of 6 months",
|
| 632 |
-
-0.
|
| 633 |
],
|
| 634 |
[
|
| 635 |
"PAY_AMT3",
|
| 636 |
-
-0.
|
| 637 |
],
|
| 638 |
[
|
| 639 |
"STATUS_2_delay of 3 months",
|
| 640 |
-
0.
|
| 641 |
],
|
| 642 |
[
|
| 643 |
"STATUS_4_delay of 8 months",
|
| 644 |
-
0.
|
| 645 |
],
|
| 646 |
[
|
| 647 |
"STATUS_5_delay of 8 months",
|
| 648 |
-
0.
|
| 649 |
],
|
| 650 |
[
|
| 651 |
"STATUS_6_delay of 8 months",
|
| 652 |
-
0.
|
| 653 |
],
|
| 654 |
[
|
| 655 |
"STATUS_4_delay of 4 months",
|
| 656 |
-
-0.
|
| 657 |
],
|
| 658 |
[
|
| 659 |
"PAID_5_no balance",
|
| 660 |
-
0.
|
| 661 |
],
|
| 662 |
[
|
| 663 |
"STATUS_0_delay of 5 months",
|
| 664 |
-
0.
|
| 665 |
],
|
| 666 |
[
|
| 667 |
"STATUS_6_delay of 5 months",
|
| 668 |
-
0.
|
| 669 |
],
|
| 670 |
[
|
| 671 |
"STATUS_5_no delinquency recorded, code undefined",
|
| 672 |
-
0.
|
| 673 |
],
|
| 674 |
[
|
| 675 |
"STATUS_3_delay of 7 months",
|
| 676 |
-
-0.
|
| 677 |
],
|
| 678 |
[
|
| 679 |
"PAID_2_paid in full",
|
| 680 |
-
-0.
|
| 681 |
],
|
| 682 |
[
|
| 683 |
"STATUS_0_delay of 6 months",
|
| 684 |
-
-0.
|
| 685 |
],
|
| 686 |
[
|
| 687 |
"STATUS_3_delay of 8 months",
|
| 688 |
-
-0.
|
| 689 |
]
|
| 690 |
],
|
| 691 |
-
"intercept": -0.
|
| 692 |
"data_url": "https://huggingface.co/datasets/drdavidprivacy/practicum-case-packs/resolve/main/corvana_modeling_extract_remediated.csv",
|
| 693 |
"dataset_repo": "https://huggingface.co/datasets/drdavidprivacy/practicum-case-packs",
|
| 694 |
"versions": {
|
|
|
|
| 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,
|
|
|
|
| 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",
|
|
|
|
| 308 |
"artifacts": {
|
| 309 |
"limitwise_v2.pkl": {
|
| 310 |
"bytes": 18636,
|
| 311 |
+
"sha256": "7842edc29acd316873ffa482db705ab2ea09427f8b4e1186436713d316de8ecb"
|
| 312 |
},
|
| 313 |
"limitwise_v2_recalibrated.pkl": {
|
| 314 |
"bytes": 89015,
|
|
|
|
| 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": {
|