How douglas-moore-engineering/hospital-readmission-agent-workflow works
The product trains and evaluates a hospital-readmission risk model, then serves predictions and health status through a FastAPI service. The notebook’s documented workflow supplies the training stages; the sampled API source shows request handling, artifact loading, and prediction. Notebook internals were not sampled, so training-stage links follow the README’s documented flow.
Main entry points: api.py Prediction endpoint · HealthCare_SmallDM.ipynb Recommendations · readmission_agent_model.joblib Trained model · readmission_agent_report.json Evaluation report
Components 20
Model training
- Patient dataset
Users/mooredouglas45/healthcare_small.csv - Load and clean
HealthCare_SmallDM.ipynb - Data split
HealthCare_SmallDM.ipynb - Preprocessing pipeline
HealthCare_SmallDM.ipynb - Candidate training
HealthCare_SmallDM.ipynb - Model selection
HealthCare_SmallDM.ipynb
Evaluation outputs
- Threshold tuning
HealthCare_SmallDM.ipynb - Holdout evaluation
HealthCare_SmallDM.ipynb - Explanations and audits
HealthCare_SmallDM.ipynb - Recommendations
HealthCare_SmallDM.ipynb
Prediction service
- Health endpoint
src/api.py - Prediction endpoint
src/api.py - Load threshold
src/api.py - Score patient
src/api.py - Load model
src/api.py - Loaded estimator
src/api.py
Model artifacts
- Trained model
artifacts/readmission_agent_model.joblib - Evaluation report
artifacts/readmission_agent_report.json
Other components
- Notebook operator
- API client
Connections 25
- Notebook operator → Load and clean: runs notebook
- Patient dataset → Load and clean: loads data
- Load and clean → Data split: cleaned data
- Data split → Preprocessing pipeline: split data
- Preprocessing pipeline → Candidate training: prepared data
- Candidate training → Model selection: candidate models
- Model selection → Threshold tuning: selected model
- Threshold tuning → Holdout evaluation: tuned threshold
- Holdout evaluation → Explanations and audits: evaluation results
- Explanations and audits → Recommendations: audit findings
- Recommendations → Trained model: saves model
- Recommendations → Evaluation report: saves report
- API client → Health endpoint: requests health
- Health endpoint → Load threshold: loads threshold
- API client → Prediction endpoint: submits patient
- Prediction endpoint → Load threshold: loads default
- Prediction endpoint → Score patient: scores patient
- Load threshold → Evaluation report: reads threshold
- Load threshold → Prediction endpoint: returns threshold
- Score patient → Load model: loads estimator
- Load model → Trained model: reads model
- Load model → Loaded estimator: returns model
- Score patient → Loaded estimator: predicts probability
- Prediction endpoint → API client: returns risk result
- Health endpoint → API client: returns status