
<!-- 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-CRF

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.2466
- Entity Metrics: {'O': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0}, 'B-ADR': {'precision': 0.9518716577540107, 'recall': 0.994413407821229, 'f1': 0.9726775956284153}, 'I-ADR': {'precision': 0.9411764705882353, 'recall': 0.9943502824858758, 'f1': 0.9670329670329672}, 'B-Disease': {'precision': 0.6923076923076923, 'recall': 0.2903225806451613, 'f1': 0.4090909090909091}, '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.7777777777777778, 'recall': 0.19444444444444445, 'f1': 0.3111111111111111}, 'I-Finding': {'precision': 0.5555555555555556, 'recall': 0.4411764705882353, 'f1': 0.49180327868852464}, '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.5996
- Micro F1: 0.9171

## 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.2871          | {'O': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0}, 'B-ADR': {'precision': 0.9502762430939227, 'recall': 0.9608938547486033, 'f1': 0.9555555555555556}, 'I-ADR': {'precision': 0.9361702127659575, 'recall': 0.9943502824858758, 'f1': 0.9643835616438357}, 'B-Disease': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Disease': {'precision': 0.5, 'recall': 0.034482758620689655, 'f1': 0.06451612903225806}, 'B-Drug': {'precision': 0.9516129032258065, 'recall': 0.959349593495935, 'f1': 0.9554655870445343}, 'I-Drug': {'precision': 0.9918032786885246, 'recall': 0.983739837398374, 'f1': 0.9877551020408164}, 'B-Finding': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Finding': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'B-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}}                                                                                                                                    | 0.4480   | 0.9078   |
| No log        | 2.0   | 200  | 0.2496          | {'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.5555555555555556, 'recall': 0.16129032258064516, 'f1': 0.25}, 'I-Disease': {'precision': 0.5454545454545454, 'recall': 0.41379310344827586, 'f1': 0.47058823529411764}, 'B-Drug': {'precision': 0.9834710743801653, 'recall': 0.967479674796748, 'f1': 0.9754098360655739}, 'I-Drug': {'precision': 0.991869918699187, 'recall': 0.991869918699187, 'f1': 0.991869918699187}, 'B-Finding': {'precision': 0.75, 'recall': 0.08333333333333333, 'f1': 0.15}, 'I-Finding': {'precision': 0.56, 'recall': 0.4117647058823529, 'f1': 0.4745762711864407}, 'B-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}}                                       | 0.5681   | 0.9159   |
| No log        | 3.0   | 300  | 0.2466          | {'O': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0}, 'B-ADR': {'precision': 0.9518716577540107, 'recall': 0.994413407821229, 'f1': 0.9726775956284153}, 'I-ADR': {'precision': 0.9411764705882353, 'recall': 0.9943502824858758, 'f1': 0.9670329670329672}, 'B-Disease': {'precision': 0.6923076923076923, 'recall': 0.2903225806451613, 'f1': 0.4090909090909091}, '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.7777777777777778, 'recall': 0.19444444444444445, 'f1': 0.3111111111111111}, 'I-Finding': {'precision': 0.5555555555555556, 'recall': 0.4411764705882353, 'f1': 0.49180327868852464}, 'B-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}, 'I-Symptom': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0}} | 0.5996   | 0.9171   |


### 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-CRF", "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