Downloads · 30 days
0
animeshakr/sba-credit-trust
sba-credit-trust is a tabular classification model from animeshakr. Use it for the tabular classification task on the model card, and read the license before you ship it in a product. It is set up for sklearn. The card lists the license as mit.
Trustworthy default-risk model for U.S. SBA small-business loans (public dataset). The artefact is a self-contained serving bundle: an Optuna-tuned XGBoost classifier + temperature calibration + conformal approve/reje…
Downloads · 30 days
0
Access
Public
Updated Jun 26, 2026
Repo size
18.7 MB
Likes
1
Public
Click a slice to open those files.
.joblib6.4 MB · 52%
From the Hugging Face model README
Trustworthy default-risk model for U.S. SBA small-business loans (public dataset). The artefact is a self-contained serving bundle: an Optuna-tuned XGBoost classifier + temperature calibration + conformal approve/reject thresholds, so a single call yields a calibrated probability and a risk-controlled auto-approve / auto-reject / refer-to-human decision.
⚠️ Research / education only — not a real lending decision system. Trained on 1987–2014 SBA loans; the conformal risk control holds in distribution and degrades under temporal shift.
serving_bundle.joblib — ServingBundle (pipeline + temperature + conformal thresholds + form schema).sba_xgb.onnx — the gradient-boosted model exported to ONNX (preprocessing kept in the serving layer).The deployed app uses a per-loan rule (approve if individual risk ≤ α, reject if ≥ 50%, else refer). The project also studies conformal marginal risk control and adaptive conformal under shift — see the GitHub repo.
from huggingface_hub import hf_hub_download
import joblib, pandas as pd
bundle = joblib.load(hf_hub_download("animeshakr/sba-credit-trust", "serving_bundle.joblib"))
X = pd.DataFrame([{ # one loan, approval-time features only
"Term": 84, "NoEmp": 5, "CreateJob": 0, "RetainedJob": 0, "GrAppv": 150000,
"SBA_Appv": 100000, "ApprovalFY": 2005, "sba_portion": 100000/150000, "real_estate": 0,
"State": "CA", "BankState": "CA", "NewExist": "1", "UrbanRural": "1",
"RevLineCr": "N", "LowDoc": "N", "naics_sector": "44", "is_franchise": 0,
}])[bundle.numeric_cols + bundle.categorical_cols]
p = bundle.predict_proba(X)[0] # calibrated P(default)
decision = bundle.decide([p], alpha=0.05)[0] # auto-approve / auto-reject / abstain (refer)
print(p, decision)
Full project (leakage-corrected benchmark, tabular DL, calibration, uncertainty, OOD, conformal, cost-sensitive policy, temporal-shift study, and adaptive conformal that restores risk control under shift), plus an honest audit (including a negative OOD result), are on GitHub: https://github.com/Animesh-Kr/sba-credit-trust
Demo Space: https://huggingface.co/spaces/animeshakr/sba-credit-trust
Reference dataset on Kaggle (mirbektoktogaraev/should-this-loan-be-approved-or-denied). A prior public
demo on this dataset over-reports due to oversampling-before-split leakage; this model corrects that.