Sushantak17/MedIntel-clinical-risk-models
0
MedIntel — Clinical Risk Prediction Models
Three calibrated XGBoost models for predicting risk of Diabetes, Chronic Kidney Disease (CKD), and Anemia from standard laboratory blood tests.
Model Details
Performance (Test Set, n=4,909)
Files
Usage
import joblib
import numpy as np
# Load calibrated model
data = joblib.load("calibrator_diabetes.joblib")
model = data["calibrated_model"]
features = data["features"]
# 35-feature input vector (13 base + 22 trend features)
# Base: age, sex_encoded, bmi, hba1c, creatinine, albumin, egfr,
# wbc, rbc, hemoglobin, hematocrit, systolic_bp, diastolic_bp
# Trend: {param}_slope, {param}_delta for each lab parameter
X = np.array([[50, 0, 31.4, 8.2, 1.0, 4.0, 91.7, 7.2, 4.9, 14.5, 43.0, 142, 88,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])
prob = model.predict_proba(X)[:, 1]
print(f"Diabetes risk: {prob[0]:.1%}") # ~94%SHAP Explainability
import shap
raw = joblib.load("xgb_diabetes.joblib")
explainer = shap.TreeExplainer(raw["model"])
shap_values = explainer.shap_values(X)
# Positive SHAP = pushes toward high risk
# Negative SHAP = pushes toward low riskFeature Importance (by SHAP)
Training Pipeline
Fully reproducible 9-step pipeline in the MedIntel repository:
- Download NHANES 2017-2018 from CDC
- Merge 8 tables, compute eGFR (CKD-EPI 2021), impute missing values
- Construct labels (ADA, KDIGO, WHO criteria)
- Synthetic longitudinal augmentation (15% of patients)
- Train XGBoost with stratified 5-fold CV
- Platt scaling calibration
- Full evaluation (AUROC, PR-AUC, Brier, subgroup analysis)
- Download BC5CDR corpus for NER
- Fine-tune BioBERT for biomedical NER
Intended Use
- Clinical decision support for healthcare providers
- Risk screening in telemedicine settings
- Research on multi-disease prediction
Limitations
- Trained on US population (NHANES) — may not generalize globally
- Trend features are synthetic (NHANES is cross-sectional)
- Not a substitute for clinical diagnosis
Citation
@software{medintel2026,
title={MedIntel: AI-Powered Clinical Risk Intelligence Platform},
author={Jha, Sushantak Parashar},
year={2026},
url={https://github.com/Sushantak17/MedIntel}
}