wangrice commited on
Commit
48cf028
·
verified ·
1 Parent(s): ebf6125

Upload NRD ICD-10 outcome models

Browse files
.gitattributes CHANGED
@@ -33,3 +33,11 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ mortality_30day/mort_hypertrial_auc.keras filter=lfs diff=lfs merge=lfs -text
37
+ mortality_30day/mort_icd_only.keras filter=lfs diff=lfs merge=lfs -text
38
+ mortality_30day/mort_no_deepset.keras filter=lfs diff=lfs merge=lfs -text
39
+ mortality_30day/mort_transformer.keras filter=lfs diff=lfs merge=lfs -text
40
+ readmission_30day/readmit_auc_icd_only_final.keras filter=lfs diff=lfs merge=lfs -text
41
+ readmission_30day/readmit_auc_no_deepset.keras filter=lfs diff=lfs merge=lfs -text
42
+ readmission_30day/readmit_auc_with_transformers.keras filter=lfs diff=lfs merge=lfs -text
43
+ readmission_30day/readmit_hypertrial_auc.keras filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: keras
3
+ tags:
4
+ - healthcare
5
+ - icd-10
6
+ - mortality-prediction
7
+ - readmission-prediction
8
+ - deepset
9
+ - tabular
10
+ ---
11
+
12
+ # NRD ICD-10 outcome models
13
+
14
+ DeepSet + (optional) Transformer models trained on the National Readmission
15
+ Database (NRD, 2016–2020) to predict two outcomes from up to 40 ICD-10
16
+ diagnosis codes plus demographics (AGE, FEMALE, PAY1, ZIPINC_QRTL).
17
+
18
+ | Subfolder | Outcome | Description |
19
+ |----------------------|----------|--------------------------------------|
20
+ | `mortality_30day/` | `MOR30` | 30-day post-discharge mortality |
21
+ | `readmission_30day/` | `REA30` | 30-day all-cause readmission |
22
+
23
+ `encoders/` holds the fitted `LabelEncoder` (ICD-10 → integer IDs) and
24
+ `MinMaxScaler` (AGE) used at training time. Inputs must be encoded with the
25
+ **same** artifacts at inference, or predictions will be meaningless.
26
+
27
+ ## Loading a model
28
+
29
+ The `.keras` files contain three custom serializable components
30
+ (`DeepSet`, `TransformerBlock`, `F2Score`) that must be importable (and
31
+ registered via `@tf.keras.utils.register_keras_serializable(package="Custom")`)
32
+ before `load_model`:
33
+
34
+ ```python
35
+ import tensorflow as tf
36
+ from huggingface_hub import hf_hub_download
37
+ # Register your custom classes — see src/train/ in the source repo
38
+ from custom_layers import DeepSet, TransformerBlock, F2Score # noqa: F401
39
+
40
+ path = hf_hub_download(
41
+ repo_id="<user-or-org>/<repo-name>",
42
+ filename="mortality_30day/mort_hypertrial_auc.keras",
43
+ )
44
+ model = tf.keras.models.load_model(path)
45
+ ```
46
+
47
+ ## Variants
48
+
49
+ Within each outcome subfolder, file suffixes denote the architecture:
50
+
51
+ - `_hypertrial_auc` — best model from the Keras-Tuner search (recommended)
52
+ - `_icd_only` — ICD codes only, no demographics (ablation)
53
+ - `_no_deepset` — flattened ICD input, no DeepSet aggregation (ablation)
54
+ - `_with_transformers` / `_transformer` — DeepSet + TransformerBlocks
55
+
56
+ ## Data restrictions
57
+
58
+ NRD is a HCUP product distributed under a Data Use Agreement. These weights
59
+ do not contain individual records, but downstream users should be aware of
60
+ the source.
encoders/full_age_scaler.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cae296fde1b1d86b15354e2390f245611df7b351d304cf366e84501974c2546
3
+ size 166
encoders/full_label_encoder.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98062e3dcc722cb18f0afa3e58ad28f6b1c14ff546b756a427198f6291169a87
3
+ size 1522664
mortality_30day/mort_hypertrial_auc.keras ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b4aa8bf890b065af1094f2bbb495694ee11936ac5ce40d91da269777b482d5bd
3
+ size 15522068
mortality_30day/mort_icd_only.keras ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:32d17ea80ffe3c6ed7fcbc0281d90189d470ade927ff30ae9d02ff51e3a02fb4
3
+ size 46129536
mortality_30day/mort_no_deepset.keras ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:896081538a1e1e583e6b59eaad9e2906c7da5a2300cfc0ec1d4269e3602c03de
3
+ size 54697244
mortality_30day/mort_transformer.keras ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:063cc825f0a390c98e9c7d39b03b6c3cea76cccdbdc4418659c6a53a5d61ef8d
3
+ size 49483977
readmission_30day/readmit_auc_icd_only_final.keras ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f032e9d7d4fae493242770a11e7372897ac5cbff057dcc134623a2b97b5cdf0b
3
+ size 29371483
readmission_30day/readmit_auc_no_deepset.keras ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d533ab3aa71524dfe414edcd542ecbf95e8739960721917bc4ef6fad35f0b5f
3
+ size 31686367
readmission_30day/readmit_auc_with_transformers.keras ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:447f40abdd2d17eda463ef2a94c593cfec84d90af7ad91ff9106cb6f126f7450
3
+ size 30528708
readmission_30day/readmit_hypertrial_auc.keras ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ef44cf9609a18f6d8f1e90dbf1bcf6f81538ac19757d129388d30d120426097
3
+ size 9949575