File size: 5,235 Bytes
65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 9b06c84 65a1a59 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
---
language:
- es
tags:
- setfit
- sentence-transformers
- text-classification
- biomedical
- clinical
- EHR
- spanish
- location
- birth place
- residence
- movement
- medical care
license: apache-2.0
metrics:
- precision
- recall
- f1
base_model:
- BSC-NLP4BIA/SapBERT-from-roberta-base-biomedical-clinical-es
model-index:
- name: BSC-NLP4BIA/location-sub-classifier
results:
- task:
type: text-classification
dataset:
name: MEDDOPLACE (subtrack 3)
type: MEDDOPLACE
metrics:
- name: precision (micro)
type: precision
value: 0.84
- name: recall (micro)
type: recall
value: 0.83
- name: f1 (micro)
type: f1
value: 0.84
pipeline_tag: text-classification
---
# LocationSubTagger
## Table of contents
<details>
<summary>Click to expand</summary>
- [Model description](#model-description)
- [How to use](#how-to-use)
- [Limitations and bias](#limitations-and-bias)
- [Training](#training)
- [Evaluation](#evaluation)
- [Additional information](#additional-information)
- [Authors](#authors)
- [Contact information](#contact-information)
- [Licensing information](#licensing-information)
- [Funding](#funding)
- [Citing information](#citing-information)
- [Disclaimer](#disclaimer)
</details>
## Model description
This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves:
1. Fine-tuning [BSC-NLP4BIA/SapBERT-from-roberta-base-biomedical-clinical-es](https://huggingface.co/BSC-NLP4BIA/SapBERT-from-roberta-base-biomedical-clinical-es) with contrastive learning using the [MEDDOPLACE](https://doi.org/10.5281/zenodo.7707566) corpus (subtrack 3) for subcategorization of location entities.
2. Training a classification head with features from the fine-tuned Sentence Transformer.
The labels for which this model has been trained are: brith place (LUGAR_NATAL), residence (RESIDENCIA), movement (MOVIMIENTO), medical care (ATENCION), and other (OTHER).
For further information, check the [official website](https://temu.bsc.es/meddoplace/).
## How to use
To use this model for inference, first install the SetFit library:
```bash
python -m pip install setfit
```
You can then run inference as follows:
```python
from setfit import SetFitModel
# Download from Hub and run inference
model = SetFitModel.from_pretrained("BSC-NLP4BIA/location-sub-classifier")
# Run inference
preds = model(["example1", "example2"])
```
## Limitations and bias
At the time of submission, no measures have been taken to estimate the bias embedded in the model. However, we are well aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources. We intend to conduct research in these areas in the future, and if completed, this model card will be updated.
## Evaluation
A classification report has been generated for the MEDDOPLACE subtask3, which yields the following results:
| Category | Precision | Recall | F1-Score |
|----------------|-----------|--------|----------|
| ATENCION | 0.87 | 0.88 | 0.88 |
| LUGAR-NATAL | 0.72 | 0.79 | 0.75 |
| MOVIMIENTO | 0.82 | 0.75 | 0.78 |
| OTHER | 0.86 | 0.83 | 0.85 |
| RESIDENCIA | 0.78 | 0.84 | 0.81 |
| **accuracy** | **0.83** | | |
| **macro avg** | 0.81 | 0.82 | 0.81 |
| **micro avg** | 0.84 | 0.83 | 0.84 |
## Additional information
### Authors
NLP4BIA team at the Barcelona Supercomputing Center ([email protected]).
### Contact information
sergi.marsol [at] bsc.es
### Licensing information
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
### Funding
TBD
### Citing information
Please cite the following works:
### Disclaimer
The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.
When third parties deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of artificial intelligence.
---
Los modelos publicados en este repositorio tienen una finalidad generalista y están a disposición de terceros. Estos modelos pueden tener sesgos y/u otro tipo de distorsiones indeseables.
Cuando terceros desplieguen o proporcionen sistemas y/o servicios a otras partes usando alguno de estos modelos (o utilizando sistemas basados en estos modelos) o se conviertan en usuarios de los modelos, deben tener en cuenta que es su responsabilidad mitigar los riesgos derivados de su uso y, en todo caso, cumplir con la normativa aplicable, incluyendo la normativa en materia de uso de inteligencia artificial.
|