Conversation
| - **Secure Computation (aTLS)** — Attested TLS verifies the TEE hardware and software stack before any patient data is uploaded | ||
| - **Multi-Party Computation** — Three independent hospitals each upload proprietary EHR datasets into the same encrypted enclave | ||
| - **Real-World Data** — Uses the [UCI Diabetes 130-US Hospitals](https://www.kaggle.com/datasets/jimschacko/10-years-diabetes-dataset) dataset (~100K real patient encounters) split across simulated hospitals | ||
| - **Healthcare Value** — Benchmark proves the consortium model outperforms any single-hospital model at predicting 30-day readmissions |
There was a problem hiding this comment.
The README states that the consortium model outperforms any single-hospital model, but this may not always be the case depending on the dataset and evaluation setup.
It might be better to phrase this as a comparison rather than a guaranteed improvement.
| Healthcare - Multi-Hospital Patient Readmission Prediction (Inference / Analysis) | ||
|
|
||
| Loads the trained consortium readmission model and produces evaluation | ||
| metrics, visualizations, and a summary report demonstrating the value of |
There was a problem hiding this comment.
This wording suggests that the consortium approach provides better results than single-hospital models, which may not always be the case depending on the dataset and evaluation setup.
It may be better to phrase this more neutrally.
| print("=" * 60) | ||
| X = combined[feature_cols].values | ||
| y = combined["readmitted_30d"].values | ||
| X_train, X_test, y_train, y_test = train_test_split( |
There was a problem hiding this comment.
This example uses a random train/test split for a healthcare prediction task. Since the dataset spans multiple years, a time-based split may provide a more realistic evaluation and reduce the risk of overly optimistic results.
| df[col] = df[col].map(med_map).fillna(0).astype(int) | ||
| df["num_med_changes"] = df[[c for c in MEDICATION_COLS if c in df.columns]].sum(axis=1) | ||
| df["total_visits"] = df["number_outpatient"] + df["number_emergency"] + df["number_inpatient"] | ||
| for col in CATEGORICAL_COLS: |
There was a problem hiding this comment.
Label encoding is applied independently to each dataset before concatenation.
This may result in inconsistent encodings for the same categorical values across hospitals, which can negatively affect the model.
It would be better to ensure a consistent mapping across all datasets.
| Xh_tr, yh_tr, test_size=0.15, random_state=42, stratify=yh_tr) | ||
| ind_model = train_model(Xh_tr, yh_tr, Xh_va, yh_va, | ||
| feature_names=feature_cols) | ||
| m = evaluate_model(ind_model, Xh_te, yh_te, |
There was a problem hiding this comment.
The evaluation setup is not directly comparable:
- The consortium model is evaluated on both a global test split and full hospital datasets
- Individual models are evaluated on their own test splits
This makes the benchmark difficult to interpret. It would be better to evaluate all models on the same holdout data.
| improvement = ((consortium_auc[0] - avg_solo) / max(abs(avg_solo), 0.01)) * 100 | ||
| print(f"\n Consortium AUC : {consortium_auc[0]:.4f}") | ||
| print(f" Avg Solo AUC : {avg_solo:.4f}") | ||
| print(f" Improvement : {improvement:+.1f}%") |
There was a problem hiding this comment.
The "improvement" metric can be negative depending on the results, which may contradict the narrative that the consortium model performs better.
It may be helpful to clarify this or avoid framing it as an improvement.
What type of PR is this?
What does this do?
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
Did you document any new/modified features?
Notes