gallstone / README.md
rosewt's picture
deploy: sync from WinterProject/demo/backend
f2f8e74 verified
|
Raw
History Blame Contribute Delete
1.41 kB
metadata
title: Gallstone Risk Demo
emoji: 🩺
colorFrom: green
colorTo: gray
sdk: docker
app_port: 8000
pinned: false
license: mit
short_description: Rural adaptation of UCI Gallstone (GB + SHAP + bioimpedance)

Gallstone Risk — FastAPI backend

Rural-adaptation inference API for a gallstone disease ML case study. Serves a scikit-learn Pipeline(StandardScaler → GradientBoostingClassifier) trained on the UCI Gallstone dataset (319 records, 25 features — no blood lab work), plus a SHAP TreeExplainer and a bioimpedance template generator.

Endpoints

Method Path Purpose
GET /health Liveness + model/explainer load state
GET /model/info Metrics JSON from training run
POST /predict/rural 25-feature payload → probability + risk_level
POST /explain/rural Same payload → SHAP values + base_value
POST /generate/bioimpedance Demographics → 15 synthetic bioimpedance vars

Validate with the Postman collection shipped in the source repo (demo/backend/postman_collection.json, 31 assertions).


Academic project · UPC 2024 · Does not replace medical diagnosis.