Edit model card

med-bert

NOTE: THE DATASET USED WAS JUST 31 ROWS AND HENCE THE MODEL DIDN'T ACHIEVE GOOD RESULTS. SPACY WAS ABLE TO PERFORM BETTER DUE TO LESS COMPLEXITY IN THE MODEL.

This model is a fine-tuned version of bert-base-uncased on the None dataset. It achieves the following results on the evaluation set:

  • Loss: 1.9379
  • Precision: 0.0128
  • Recall: 0.0794
  • F1: 0.0221
  • Accuracy: 0.1707
  • All Metrics: {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}

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: 1e-08
  • 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: 20

Training results

Training Loss Epoch Step Validation Loss Precision Recall F1 Accuracy All Metrics
No log 1.0 3 1.9408 0.0128 0.0794 0.0220 0.1693 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.030927835051546393, 'recall': 0.1875, 'f1': 0.05309734513274336, 'number': 16}, 'overall_precision': 0.01278772378516624, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02202643171806167, 'overall_accuracy': 0.1692524682651622}
No log 2.0 6 1.9405 0.0128 0.0794 0.0220 0.1693 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.030927835051546393, 'recall': 0.1875, 'f1': 0.05309734513274336, 'number': 16}, 'overall_precision': 0.01278772378516624, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02202643171806167, 'overall_accuracy': 0.1692524682651622}
No log 3.0 9 1.9402 0.0128 0.0794 0.0220 0.1693 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.030927835051546393, 'recall': 0.1875, 'f1': 0.05309734513274336, 'number': 16}, 'overall_precision': 0.01278772378516624, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02202643171806167, 'overall_accuracy': 0.1692524682651622}
No log 4.0 12 1.9400 0.0128 0.0794 0.0220 0.1693 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.030927835051546393, 'recall': 0.1875, 'f1': 0.05309734513274336, 'number': 16}, 'overall_precision': 0.01278772378516624, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02202643171806167, 'overall_accuracy': 0.1692524682651622}
No log 5.0 15 1.9397 0.0128 0.0794 0.0220 0.1693 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.030927835051546393, 'recall': 0.1875, 'f1': 0.05309734513274336, 'number': 16}, 'overall_precision': 0.01278772378516624, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02202643171806167, 'overall_accuracy': 0.1692524682651622}
No log 6.0 18 1.9395 0.0128 0.0794 0.0220 0.1693 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.030927835051546393, 'recall': 0.1875, 'f1': 0.05309734513274336, 'number': 16}, 'overall_precision': 0.01278772378516624, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02202643171806167, 'overall_accuracy': 0.1692524682651622}
No log 7.0 21 1.9392 0.0128 0.0794 0.0220 0.1693 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.030927835051546393, 'recall': 0.1875, 'f1': 0.05309734513274336, 'number': 16}, 'overall_precision': 0.01278772378516624, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02202643171806167, 'overall_accuracy': 0.1692524682651622}
No log 8.0 24 1.9390 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 9.0 27 1.9388 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 10.0 30 1.9387 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 11.0 33 1.9385 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 12.0 36 1.9384 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 13.0 39 1.9383 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 14.0 42 1.9382 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 15.0 45 1.9381 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 16.0 48 1.9380 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 17.0 51 1.9380 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 18.0 54 1.9379 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 19.0 57 1.9379 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}
No log 20.0 60 1.9379 0.0128 0.0794 0.0221 0.1707 {'MedicalCondition': {'precision': 0.011428571428571429, 'recall': 0.05714285714285714, 'f1': 0.019047619047619046, 'number': 35}, 'Medicine': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 12}, 'Pathogen': {'precision': 0.03125, 'recall': 0.1875, 'f1': 0.05357142857142857, 'number': 16}, 'overall_precision': 0.01282051282051282, 'overall_recall': 0.07936507936507936, 'overall_f1': 0.02207505518763797, 'overall_accuracy': 0.17066290550070523}

Framework versions

  • Transformers 4.35.2
  • Pytorch 2.1.1+cu121
  • Datasets 2.15.0
  • Tokenizers 0.15.0
Downloads last month
13
Safetensors
Model size
109M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for praneethvasarla/med-bert

Finetuned
(2018)
this model