Update README.md
Browse files
README.md
CHANGED
@@ -1,20 +1,40 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
Binary classification for glaucoma diagnosis extraction from unstructured clinical notes.
|
4 |
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
Model Description
|
8 |
This model is a fine-tuned variant of OphthaBERT, which was pretrained on over 2 million clinical notes. It has been fine-tuned for binary classification on labeled clinical notes from Massachusetts Eye and Ear Infirmary.
|
9 |
|
10 |
-
Finetuned from model
|
11 |
-
|
|
|
|
|
|
|
12 |
|
13 |
We suggest utilizing this model in a zero-shot manner to generate binary glaucoma labels for each clinical note. For continued training on limited data, we recommend freezing the first 10 layers of the model.
|
14 |
|
15 |
-
Direct Use
|
|
|
16 |
Use the code below to get started with the model:
|
17 |
|
|
|
18 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
19 |
|
20 |
# Load the fine-tuned model and tokenizer
|
@@ -25,84 +45,3 @@ tokenizer = AutoTokenizer.from_pretrained("ShahRishi/OphthaBERT-v2-glaucoma-bina
|
|
25 |
clinical_note = "Example clinical note text..."
|
26 |
inputs = tokenizer(clinical_note, return_tensors="pt", truncation=True, max_length=512)
|
27 |
outputs = model(**inputs)
|
28 |
-
Out-of-Scope Use
|
29 |
-
All variants of BERT are known to struggle with negations; however, this model has been fine-tuned to handle both affirmative cases and negations. Note that the context window of the model is 512 tokens, so it is recommended to chunk notes longer than 512 tokens for inference.
|
30 |
-
|
31 |
-
Bias, Risks, and Limitations
|
32 |
-
|
33 |
-
All pretraining and fine-tuning were performed on anonymized notes from the Massachusetts Eye and Ear Infirmary.
|
34 |
-
|
35 |
-
Training Details
|
36 |
-
|
37 |
-
Training Data
|
38 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
39 |
-
[More Information Needed]
|
40 |
-
|
41 |
-
Training Procedure
|
42 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
43 |
-
Preprocessing [optional]
|
44 |
-
|
45 |
-
[More Information Needed]
|
46 |
-
|
47 |
-
Training Hyperparameters
|
48 |
-
|
49 |
-
Training regime: [More Information Needed] <!-- Options: fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
50 |
-
Speeds, Sizes, Times [optional]
|
51 |
-
|
52 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
53 |
-
[More Information Needed]
|
54 |
-
|
55 |
-
Evaluation
|
56 |
-
|
57 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
58 |
-
Testing Data, Factors & Metrics
|
59 |
-
Testing Data
|
60 |
-
|
61 |
-
<!-- This should link to a Dataset Card if possible. -->
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
Factors
|
65 |
-
|
66 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
67 |
-
[More Information Needed]
|
68 |
-
|
69 |
-
Metrics
|
70 |
-
|
71 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
72 |
-
[More Information Needed]
|
73 |
-
|
74 |
-
Results
|
75 |
-
[More Information Needed]
|
76 |
-
|
77 |
-
Summary
|
78 |
-
|
79 |
-
Model Examination [optional]
|
80 |
-
|
81 |
-
<!-- Relevant interpretability work for the model goes here -->
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
Environmental Impact
|
85 |
-
|
86 |
-
Carbon emissions can be estimated using the Machine Learning Impact Calculator presented in Lacoste et al. (2019).
|
87 |
-
|
88 |
-
Hardware Type: [More Information Needed]
|
89 |
-
Hours used: [More Information Needed]
|
90 |
-
Cloud Provider: [More Information Needed]
|
91 |
-
Compute Region: [More Information Needed]
|
92 |
-
Carbon Emitted: [More Information Needed]
|
93 |
-
Technical Specifications [optional]
|
94 |
-
|
95 |
-
Model Architecture and Objective
|
96 |
-
[More Information Needed]
|
97 |
-
|
98 |
-
Compute Infrastructure
|
99 |
-
[More Information Needed]
|
100 |
-
|
101 |
-
Hardware
|
102 |
-
|
103 |
-
[More Information Needed]
|
104 |
-
|
105 |
-
Software
|
106 |
-
|
107 |
-
[More Information Needed]
|
108 |
-
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
tags:
|
4 |
+
- medical
|
5 |
+
license: mit
|
6 |
+
language:
|
7 |
+
- en
|
8 |
+
base_model:
|
9 |
+
- ShahRishi/OphthaBERT-v2
|
10 |
+
pipeline_tag: text-classification
|
11 |
+
---
|
12 |
+
|
13 |
+
# OphtaBERT Glaucoma Classifier
|
14 |
|
15 |
Binary classification for glaucoma diagnosis extraction from unstructured clinical notes.
|
16 |
|
17 |
+
---
|
18 |
+
|
19 |
+
## Model Details
|
20 |
+
|
21 |
+
### Model Description
|
22 |
|
|
|
23 |
This model is a fine-tuned variant of OphthaBERT, which was pretrained on over 2 million clinical notes. It has been fine-tuned for binary classification on labeled clinical notes from Massachusetts Eye and Ear Infirmary.
|
24 |
|
25 |
+
- **Finetuned from model:** [OphthaBERT-v2]
|
26 |
+
|
27 |
+
---
|
28 |
+
|
29 |
+
## Uses
|
30 |
|
31 |
We suggest utilizing this model in a zero-shot manner to generate binary glaucoma labels for each clinical note. For continued training on limited data, we recommend freezing the first 10 layers of the model.
|
32 |
|
33 |
+
### Direct Use
|
34 |
+
|
35 |
Use the code below to get started with the model:
|
36 |
|
37 |
+
```python
|
38 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
39 |
|
40 |
# Load the fine-tuned model and tokenizer
|
|
|
45 |
clinical_note = "Example clinical note text..."
|
46 |
inputs = tokenizer(clinical_note, return_tensors="pt", truncation=True, max_length=512)
|
47 |
outputs = model(**inputs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|