leon93 commited on
Commit
292e2a2
1 Parent(s): bfb596c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +222 -3
README.md CHANGED
@@ -1,3 +1,222 @@
1
- ---
2
- license: cc-by-nc-nd-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - biology
5
+ - medical
6
+ license: cc-by-nc-nd-4.0
7
+ datasets:
8
+ - fundacionctic/DermatES
9
+ language:
10
+ - es
11
+ metrics:
12
+ - accuracy
13
+ - f1
14
+ pipeline_tag: text-classification
15
+ ---
16
+
17
+ # Model Card for Model ID
18
+
19
+ This is a fine-tuned version of the pre-trained biomedical language model [bsc-bio-ehr-es](https://huggingface.co/PlanTL-GOB-ES/bsc-bio-ehr-es) in Spanish, tailored for text classification tasks. We used two NVIDIA GPUs for training.
20
+
21
+
22
+ ## Model Details
23
+
24
+ ### Model Description
25
+
26
+ This model has been fine-tuned for text classification on dermatological Spanish electronic health records (EHR). It leverages the pre-trained biomedical language understanding from the [bsc-bio-ehr-es](https://huggingface.co/PlanTL-GOB-ES/bsc-bio-ehr-es) model and adapts it to classify dermatology-related texts effectively.
27
+ The model is intended to predict among 25 different skin diseases from a medical record. It could be a first visit or a follow-up visit.
28
+ It takes as input *textual medical record:* the EHR written by a doctor
29
+
30
+
31
+ This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
32
+
33
+ - **Developed by:** [Fundacion CTIC](https://www.fundacionctic.org)
34
+ - **Funded by [optional]:** [SATEC](https://www.satec.es)
35
+ - **Model type:** Fine-tuned LM Encoder
36
+ - **Language(s) (NLP):** Spanish
37
+ - **License:** CC-BY-NC
38
+ - **Finetuned from model [optional]:** [bsc-bio-ehr-es](https://huggingface.co/PlanTL-GOB-ES/bsc-bio-ehr-es)
39
+
40
+ ### Model Sources [optional]
41
+
42
+ <!-- Provide the basic links for the model. -->
43
+
44
+ - **Repository:**
45
+ - **Paper [optional]:** Coming soon...
46
+ - **Demo [optional]:** [More Information Needed]
47
+
48
+ ## Uses
49
+
50
+ The Model is industry-friendly but not the best model of the **dermat** collection. The top version of the model is called [predict-dermat](https://huggingface.co/fundacionctic/predict-dermat/) and is meant to predict not only the disease but also the 3 features mentionned above.
51
+ We DO NOT recommend to fine-tune this model. It is already meant to be a downstream task.
52
+ ### Direct Use
53
+
54
+ This model can be directly used for classifying dermatological text data in Spanish EHRs.
55
+
56
+
57
+ ### Downstream Use [optional]
58
+ The model can be integrated into healthcare applications for automatic classification of dermatological conditions from patient records.
59
+
60
+
61
+ [More Information Needed]
62
+
63
+ ### Out-of-Scope Use
64
+
65
+ The model is not suitable for non-medical text classification tasks or for texts in languages other than Spanish.
66
+
67
+ [More Information Needed]
68
+
69
+ ## Bias, Risks, and Limitations
70
+
71
+ This model is fine-tuned on a specific dataset and may not generalize well to other types of medical texts or conditions. Users should be cautious of biases in the training data that could affect the model's performance.
72
+
73
+ [More Information Needed]
74
+
75
+ ### Recommendations
76
+
77
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
78
+
79
+ Users should validate the model's performance on their specific data and consider any ethical implications of deploying a machine learning model in a healthcare setting.
80
+
81
+ ## How to Get Started with the Model
82
+ ```
83
+ from transformers import RobertaTokenizerFast, RobertaForSequenceClassification,
84
+
85
+ tokenizer = RobertaTokenizerFast.from_pretrained("fundacionctic/vanilla-dermat")
86
+ model = RobertaForSequenceClassification.from_pretrained("fundacionctic/vanilla-dermat")
87
+
88
+
89
+ inputs = tokenizer("Ejemplo de texto dermatológico".tolist(),
90
+ truncation=True,
91
+ padding='max_length',
92
+ max_length=max_length, # Replace with your desired maximum sequence length
93
+ return_tensors='pt',
94
+ return_attention_mask=True,
95
+ ))
96
+ outputs = model(input_ids, attention_mask=attention_mask)
97
+ ```
98
+
99
+
100
+ [More Information Needed]
101
+
102
+ ## Training Details
103
+
104
+ ### Training Data
105
+
106
+ The model was fine-tuned on the DermatES dataset from Fundación CTIC, which contains Spanish dermatological EHRs.
107
+ [More Information Needed]
108
+
109
+ ### Training Procedure
110
+
111
+ The training used two NVIDIA GPUs (11gb and 49gb)
112
+
113
+ #### Preprocessing [optional]
114
+
115
+ Lowercased, anonymized and accents removed texts
116
+
117
+
118
+ #### Training Hyperparameters
119
+
120
+ - **Training regime:** fp32
121
+
122
+ #### Speeds, Sizes, Times [optional]
123
+
124
+ Epochs: 7
125
+ Batch size: 64
126
+ Learning rate: 0.0001
127
+
128
+ [More Information Needed]
129
+
130
+ ## Evaluation
131
+
132
+
133
+
134
+ ### Testing Data, Factors & Metrics
135
+
136
+
137
+ #### Testing Data
138
+
139
+ The evaluation was performed on 0.2 of the [DermatES](https://huggingface.co/datasets/fundacionctic/DermatES) dataset.
140
+
141
+ [More Information Needed]
142
+
143
+ #### Factors
144
+
145
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
146
+
147
+ [More Information Needed]
148
+
149
+ #### Metrics
150
+
151
+ - *Accuracy:* 0.51
152
+ - *F1 Score:* 0.42
153
+ - *top-k (k=2) accuracy:* 0.67
154
+ - *top-k (k=2) f1 Score:* 0.61
155
+
156
+
157
+ #### Summary
158
+
159
+ The model achieves poor accuracy and F1 score on dermatological text classification, demonstrating the need of using ontologies (see [oracle-dermat](https://huggingface.co/datasets/fundacionctic/oracle-dermat) ) for this specific medical domain.
160
+
161
+ ## Model Examination [optional]
162
+
163
+ <!-- Relevant interpretability work for the model goes here -->
164
+
165
+ [More Information Needed]
166
+
167
+ ## Environmental Impact
168
+
169
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
170
+
171
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
172
+
173
+ - **Hardware Type:** GPU and CPU with avx
174
+ - **Hours used:** >96
175
+ - **Cloud Provider:** [More Information Needed]
176
+ - **Compute Region:** EU
177
+ - **Carbon Emitted:** [More Information Needed]
178
+
179
+ ## Technical Specifications [optional]
180
+
181
+ ### Model Architecture and Objective
182
+
183
+ The model is based on the [RoBERTa](https://huggingface.co/FacebookAI/roberta-base) architecture, fine-tuned for the objective of text classification in the biomedical domain.
184
+
185
+ ### Compute Infrastructure
186
+
187
+
188
+
189
+ #### Hardware
190
+
191
+ Two NVIDIA GPUs were used for the fine-tuning process.
192
+ #### Software
193
+
194
+ The fine-tuning was performed using the 🤗 Transformers library.
195
+
196
+ ## Citation [optional]
197
+
198
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
199
+
200
+ **BibTeX:** Coming soon
201
+
202
+ [More Information Needed]
203
+
204
+ **APA:**
205
+
206
+ [More Information Needed]
207
+
208
+ ## Glossary [optional]
209
+
210
+
211
+
212
+ ## More Information [optional]
213
+
214
+ [More Information Needed]
215
+
216
+ ## Model Card Authors [optional]
217
+
218
+ Leon-Paul Schaub Torre, Pelayo Quiros and Helena Garcia-Mieres
219
+
220
+ ## Model Card Contact
221
+
222
+ leon.schaub@fundacionctic.org