How praman918/personalized-cardiovascular-disease-risk-prediction works
This is a cardiovascular-risk web application backed by a simulated three-hospital federated-learning training workflow. The user enters 15 clinical features in the Streamlit app, which loads the trained model and presents a risk prediction, contributing factors, and recommendations. Separately, simulation orchestration generates and partitions synthetic records, coordinates local client training and server aggregation, evaluates the global model, and saves weights for the app. The graph preserves the README-described reporting capabilities; unsampled app sections are represented at subsystem level rather than treated as inspected implementation.
Main entry points: app.py Risk Inference · server.py FL Server · client.py Hospital Client · run_simulation.py Simulation Runner
Components 14
Clinical Risk App
- Clinical Form
app.py - Risk Inference
app.py - Risk Gauge
app.py - Risk Badges
app.py - Clinical Advice
app.py - Feature Contributions
app.py
Federated Training
- Simulation Runner
run_simulation.py - FL Server
server.py - Hospital Client
client.py
Model and Data
- EHR Generator
data_generator.py - Partitioned CSV Data
- Global Model
model.py - Saved Weights
Other components
- Patient
Connections 18
- Patient → Clinical Form: enters data
README.md - Clinical Form → Risk Inference: submits features
README.md - Risk Inference → Global Model: loads and predicts
app.py - Risk Inference → Saved Weights: loads weights
app.py - Risk Inference → Risk Gauge: shows risk
README.md - Risk Inference → Risk Badges: identifies factors
README.md - Risk Inference → Clinical Advice: generates advice
app.py - Risk Inference → Feature Contributions: shows contributions
README.md - Simulation Runner → EHR Generator: runs generator
run_simulation.py - EHR Generator → Partitioned CSV Data: writes partitions
data_generator.py - Simulation Runner → Hospital Client: starts clients
run_simulation.py - Simulation Runner → FL Server: starts server
run_simulation.py - FL Server → Hospital Client: requests local training
server.py - Hospital Client → Partitioned CSV Data: reads client records
client.py - Hospital Client → Global Model: trains model
client.py - FL Server → Global Model: aggregates and evaluates
README.md - FL Server → Partitioned CSV Data: reads test set
server.py - FL Server → Saved Weights: saves weights
server.py