|
BioClinicalBERT-based Triage Classification Model Documentation |
|
Model Overview |
|
This documentation outlines the fine-tuned BioClinicalBERT model for medical triage classification. |
|
Model Name: BioClinicalBERT-Triage |
|
Base Model: emilyalsentzer/Bio_ClinicalBERT |
|
Task: Medical triage classification |
|
Classes: Emergency, Urgent, Non-Urgent, Routine, Follow-up |
|
Training Dataset Size: 34,010 samples |
|
Validation Dataset Size: 8,503 samples |
|
Model Metrics |
|
|
|
Final Training Loss: 0.3246 |
|
Training Samples Per Second: 13.99 |
|
Training Time: Approximately 2 hours |
|
|
|
Model Description |
|
This model was fine-tuned from the BioClinicalBERT foundation model to classify medical symptoms into appropriate triage categories. It |
|
How to Use |
|
pythonfrom transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline |
|
|
|
# Load model and tokenizer |
|
tokenizer = AutoTokenizer.from_pretrained("YourUsername/BioClinicalBERT-Triage") |
|
model = AutoModelForSequenceClassification.from_pretrained("VolodymyrPugachov/BioClinicalBERT-Triage") |
|
|
|
# Create classification pipeline |
|
classifier = pipeline( |
|
"text-classification", |
|
model=model, |
|
tokenizer=tokenizer, |
|
top_k=None |
|
) |
|
|
|
# Example usage |
|
symptoms = "I'm having severe chest pain that radiates to my left arm and jaw. I'm also feeling short of breath and nauseous." |
|
medical_history = "History of high blood pressure" |
|
text_input = f"{symptoms} {medical_history}" |
|
|
|
# Get prediction |
|
results = classifier(text_input) |
|
print(results) |
|
Limitations |
|
|
|
The model has been trained on specific medical text data and may not generalize well to significantly different symptom descriptions or medical specialties. |
|
It should be used as a supportive tool for healthcare professionals, not as a replacement for clinical judgment. |
|
Performance may vary for rare or complex medical conditions not well-represented in the training data. |
|
|
|
pythonfrom transformers import AutoModelForSequenceClassification, AutoTokenizer |
|
|
|
# Load from Hugging Face Hub |
|
model = AutoModelForSequenceClassification.from_pretrained("VolodymyrPugachov/BioClinicalBERT-Triage") |
|
tokenizer = AutoTokenizer.from_pretrained("VolodymyrPugachov/BioClinicalBERT-Triage") |