
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# bert-finetuned-ner-bilstm

This model is a fine-tuned version of [bert-base-cased](https://huggingface.co/bert-base-cased) on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2441
- Entity Metrics: {'O': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0}, 'B-ADR': {'precision': 0.9516129032258065, 'recall': 0.9888268156424581, 'f1': 0.9698630136986301}, 'I-ADR': {'precision': 0.9411764705882353, 'recall': 0.9943502824858758, 'f1': 0.9670329670329672}, 'B-Disease': {'precision': 0.5882352941176471, 'recall': 0.3225806451612903, 'f1': 0.41666666666666663}, 'I-Disease': {'precision': 0.5, 'recall': 0.4482758620689655, 'f1': 0.4727272727272727}, 'B-Drug': {'precision': 0.9836065573770492, 'recall': 0.975609756097561, 'f1': 0.9795918367346939}, 'I-Drug': {'precision': 0.991869918699187, 'recall': 0.991869918699187, 'f1': 0.991869918699187}, 'B-Finding': {'precision': 0.875, 'recall': 0.19444444444444445, 'f1': 0.3181818181818182}, 'I-Finding': {'precision': 0.7368421052631579, 'recall': 0.4117647058823529, 'f1': 0.5283018867924528}, 'B-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}}
- Macro F1: 0.6040
- Micro F1: 0.9196

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3

### Training results

| Training Loss | Epoch | Step | Validation Loss | Entity Metrics                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Macro F1 | Micro F1 |
|:-------------:|:-----:|:----:|:---------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------:|:--------:|
| No log        | 1.0   | 100  | 0.2884          | {'O': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0}, 'B-ADR': {'precision': 0.9510869565217391, 'recall': 0.9776536312849162, 'f1': 0.9641873278236915}, 'I-ADR': {'precision': 0.9408602150537635, 'recall': 0.9887005649717514, 'f1': 0.9641873278236914}, 'B-Disease': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Disease': {'precision': 0.625, 'recall': 0.1724137931034483, 'f1': 0.2702702702702703}, 'B-Drug': {'precision': 0.9754098360655737, 'recall': 0.967479674796748, 'f1': 0.9714285714285714}, 'I-Drug': {'precision': 1.0, 'recall': 0.991869918699187, 'f1': 0.9959183673469388}, 'B-Finding': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Finding': {'precision': 1.0, 'recall': 0.029411764705882353, 'f1': 0.05714285714285715}, 'B-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}}                                                                                                       | 0.4748   | 0.9091   |
| No log        | 2.0   | 200  | 0.2512          | {'O': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0}, 'B-ADR': {'precision': 0.9516129032258065, 'recall': 0.9888268156424581, 'f1': 0.9698630136986301}, 'I-ADR': {'precision': 0.9411764705882353, 'recall': 0.9943502824858758, 'f1': 0.9670329670329672}, 'B-Disease': {'precision': 0.7, 'recall': 0.22580645161290322, 'f1': 0.3414634146341463}, 'I-Disease': {'precision': 0.55, 'recall': 0.3793103448275862, 'f1': 0.4489795918367347}, 'B-Drug': {'precision': 0.9916666666666667, 'recall': 0.967479674796748, 'f1': 0.9794238683127573}, 'I-Drug': {'precision': 1.0, 'recall': 0.983739837398374, 'f1': 0.9918032786885246}, 'B-Finding': {'precision': 1.0, 'recall': 0.05555555555555555, 'f1': 0.10526315789473684}, 'I-Finding': {'precision': 0.6, 'recall': 0.35294117647058826, 'f1': 0.4444444444444445}, 'B-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}}                                           | 0.5680   | 0.9166   |
| No log        | 3.0   | 300  | 0.2441          | {'O': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0}, 'B-ADR': {'precision': 0.9516129032258065, 'recall': 0.9888268156424581, 'f1': 0.9698630136986301}, 'I-ADR': {'precision': 0.9411764705882353, 'recall': 0.9943502824858758, 'f1': 0.9670329670329672}, 'B-Disease': {'precision': 0.5882352941176471, 'recall': 0.3225806451612903, 'f1': 0.41666666666666663}, 'I-Disease': {'precision': 0.5, 'recall': 0.4482758620689655, 'f1': 0.4727272727272727}, 'B-Drug': {'precision': 0.9836065573770492, 'recall': 0.975609756097561, 'f1': 0.9795918367346939}, 'I-Drug': {'precision': 0.991869918699187, 'recall': 0.991869918699187, 'f1': 0.991869918699187}, 'B-Finding': {'precision': 0.875, 'recall': 0.19444444444444445, 'f1': 0.3181818181818182}, 'I-Finding': {'precision': 0.7368421052631579, 'recall': 0.4117647058823529, 'f1': 0.5283018867924528}, 'B-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}} | 0.6040   | 0.9196   |


### Framework versions

- Transformers 4.36.2
- Pytorch 2.1.2+cpu
- Datasets 2.16.0
- Tokenizers 0.15.0

{"license": "apache-2.0", "tags": ["generated_from_trainer"], "base_model": "bert-base-cased", "model-index": [{"name": "bert-finetuned-ner-bilstm", "results": []}]}
transformers tensorboard safetensors bert token-classification generated_from_trainer base_model:bert-base-cased license:apache-2.0 autotrain_compatible endpoints_compatible region:us