Create Instructions
Browse files- Instructions +51 -0
Instructions
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
BioClinicalBERT-based Triage Classification Model Documentation
|
2 |
+
Model Overview
|
3 |
+
This documentation outlines the fine-tuned BioClinicalBERT model for medical triage classification.
|
4 |
+
Model Name: BioClinicalBERT-Triage
|
5 |
+
Base Model: emilyalsentzer/Bio_ClinicalBERT
|
6 |
+
Task: Medical triage classification
|
7 |
+
Classes: Emergency, Urgent, Non-Urgent, Routine, Follow-up
|
8 |
+
Training Dataset Size: 34,010 samples
|
9 |
+
Validation Dataset Size: 8,503 samples
|
10 |
+
Model Metrics
|
11 |
+
|
12 |
+
Final Training Loss: 0.3246
|
13 |
+
Training Samples Per Second: 13.99
|
14 |
+
Training Time: Approximately 2 hours
|
15 |
+
|
16 |
+
Model Description
|
17 |
+
This model was fine-tuned from the BioClinicalBERT foundation model to classify medical symptoms into appropriate triage categories. It's designed to support healthcare professionals in prioritizing patient care based on symptom descriptions. The model processes text descriptions of symptoms and medical history to predict one of the predefined triage categories.
|
18 |
+
How to Use
|
19 |
+
pythonfrom transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
20 |
+
|
21 |
+
# Load model and tokenizer
|
22 |
+
tokenizer = AutoTokenizer.from_pretrained("YourUsername/BioClinicalBERT-Triage")
|
23 |
+
model = AutoModelForSequenceClassification.from_pretrained("VolodymyrPugachov/BioClinicalBERT-Triage")
|
24 |
+
|
25 |
+
# Create classification pipeline
|
26 |
+
classifier = pipeline(
|
27 |
+
"text-classification",
|
28 |
+
model=model,
|
29 |
+
tokenizer=tokenizer,
|
30 |
+
top_k=None
|
31 |
+
)
|
32 |
+
|
33 |
+
# Example usage
|
34 |
+
symptoms = "I'm having severe chest pain that radiates to my left arm and jaw. I'm also feeling short of breath and nauseous."
|
35 |
+
medical_history = "History of high blood pressure"
|
36 |
+
text_input = f"{symptoms} {medical_history}"
|
37 |
+
|
38 |
+
# Get prediction
|
39 |
+
results = classifier(text_input)
|
40 |
+
print(results)
|
41 |
+
Limitations
|
42 |
+
|
43 |
+
The model has been trained on specific medical text data and may not generalize well to significantly different symptom descriptions or medical specialties.
|
44 |
+
It should be used as a supportive tool for healthcare professionals, not as a replacement for clinical judgment.
|
45 |
+
Performance may vary for rare or complex medical conditions not well-represented in the training data.
|
46 |
+
|
47 |
+
pythonfrom transformers import AutoModelForSequenceClassification, AutoTokenizer
|
48 |
+
|
49 |
+
# Load from Hugging Face Hub
|
50 |
+
model = AutoModelForSequenceClassification.from_pretrained("VolodymyrPugachov/BioClinicalBERT-Triage")
|
51 |
+
tokenizer = AutoTokenizer.from_pretrained("VolodymyrPugachov/BioClinicalBERT-Triage")
|