Add CaliForest model, data loader, task, and calibration metrics#971
Open
cgigliob wants to merge 1 commit intosunlabuiuc:masterfrom
Open
Add CaliForest model, data loader, task, and calibration metrics#971cgigliob wants to merge 1 commit intosunlabuiuc:masterfrom
cgigliob wants to merge 1 commit intosunlabuiuc:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CaliForest: Calibrated Random Forest for Health Data
Contributors:
Contribution Type: Full Pipeline (Dataset + Task + Model)
Paper: Y. Park and J. C. Ho. "CaliForest: Calibrated Random Forest for Health Data." ACM CHIL, 2020. https://doi.org/10.1145/3368555.3384461
Description:
Reimplementation of CaliForest within PyHealth. CaliForest uses out-of-bag prediction variance with an Inverse-Gamma prior to learn a calibrated random forest without requiring a held-out calibration set. Supports isotonic, logistic, and beta calibration. Includes dataset loader for MIMIC-Extract, parameterized task for 4 binary prediction targets, and 6 calibration metrics.
Files to review:
New files:
pyhealth/models/califorest.py— CaliForest model (BaseModel)pyhealth/datasets/califorest_mimic_extract.py— MIMIC-Extract loader (BaseDataset)pyhealth/datasets/configs/califorest_mimic_extract.yaml— Dataset configpyhealth/tasks/mimic_extract_califorest.py— Task (BaseTask)pyhealth/metrics/califorest_calibration.py— 6 calibration metricstests/test_califorest.py— Model tests (7)tests/test_calibration_metrics.py— Metrics tests (11)tests/test_mimic_extract_califorest_task.py— Task tests (7)tests/test_califorest_mimic_extract_dataset.py— Dataset tests (6)examples/califorest_mimic_extract_mortality_califorest.py— Ablation scriptdocs/api/models/pyhealth.models.CaliForest.rstdocs/api/datasets/pyhealth.datasets.CaliForestMIMICExtractDataset.rstdocs/api/tasks/pyhealth.tasks.MIMICExtractCaliForestTask.rstModified files:
docs/api/models.rst— Added toctree entrydocs/api/datasets.rst— Added toctree entrydocs/api/tasks.rst— Added toctree entry31 tests passing. All use synthetic data.