Downloads · 30 days
0
erikabear95/transitionrx-readmission-xgboost
transitionrx-readmission-xgboost is a tabular classification model from erikabear95. Use it for the tabular classification task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Gradient-boosted classifier that ranks diabetes inpatient discharges by risk of a 30-day readmission, so limited pharmacist and case-manager time can be targeted at the patients most likely to bounce back.
Downloads · 30 days
0
Access
Public
Updated Aug 22, 2026
Repo size
8.8 MB
Likes
0
Public
Click a slice to open those files.
.pkl8.8 MB · 100%
From the Hugging Face model README
Gradient-boosted classifier that ranks diabetes inpatient discharges by risk of a 30-day readmission, so limited pharmacist and case-manager time can be targeted at the patients most likely to bounce back.
Use: ranking discharges to prioritize pharmacist-led medication reconciliation and post-discharge follow-up under a fixed staffing capacity.
Not for: clinical diagnosis, treatment decisions, denying care, or any individual-level determination made without a clinician. The model predicts readmission risk, not preventability and not responsiveness to intervention.
UCI Diabetes 130-US Hospitals, 1999-2008.
Cohort construction:
readmitted == '<30'. Prevalence approximately n/a.116 features engineered from medication columns, prior utilization, discharge disposition, and diagnosis groupings. Headline engineered features:
complexity_index - diabetes drug count + 2 x regimen changesregimen_change_score - dose escalations + de-escalations during the stayprior_inpatient_band, prior_emergency_band - prior-year utilizationhome_no_services, transferred_facility - care-transition quality proxies| Metric | Value |
|---|---|
| ROC-AUC | 0.6546 |
| PR-AUC | 0.1661 (base rate n/a) |
| Operating threshold | 0.57 |
| Recall at threshold | 0.3795 |
| Precision at threshold | 0.1771 |
ROC-AUC in the mid-0.60s is the realistic ceiling for this dataset and consistent with published work on it. Administrative billing data contains no vital signs, lab trends, social determinants, medication adherence, or discharge-summary text. This is a ranking tool for allocating a scarce resource, not a clinical diagnostic.
The default 0.5 cutoff is not used. The operating threshold of 0.57 corresponds to reviewing roughly the top 20% of discharges - a pharmacist capacity constraint, not a statistical optimum. Re-tune it to your own capacity.
| File | Purpose |
|---|---|
transitionrx_xgb_model.pkl | Tuned XGBoost classifier (ranking) |
transitionrx_calibrated_model.pkl | Isotonic-calibrated version (probabilities) |
transitionrx_metadata.json | Metrics, params, threshold, assumptions |
transitionrx_feature_columns.csv | Exact feature order required at inference |
Use the calibrated model for anything involving expected cost. scale_pos_weight distorts
raw probabilities upward; they rank well but are not literal probabilities.
import joblib, pandas as pd
from huggingface_hub import hf_hub_download
model = joblib.load(hf_hub_download("erikabear95/transitionrx-readmission-xgboost", "transitionrx_xgb_model.pkl"))
cols = pd.read_csv(hf_hub_download("erikabear95/transitionrx-readmission-xgboost", "transitionrx_feature_columns.csv"))["feature"]
X_new = X_new.reindex(columns=cols, fill_value=0) # column order must match exactly
risk = model.predict_proba(X_new)[:, 1]