language:
- en library_name: transformers tags:
- medical
- symptoms
- diagnosis
- text-classification
- healthcare
- clinical
- symptom-to-disease
- experimental
- test-version pipeline_tag: text-classification metrics:
- accuracy
- f1
- precision
- recall license: mit model-index:
- name: medical-diagnosis-en
results:
- task:
type: text-classification
name: Medical Diagnosis Classification (English) — TEST VERSION
dataset:
name: NeuronZero/Symptom2Disease
type: NeuronZero/Symptom2Disease
metrics:
- name: Accuracy type: accuracy value: 0.8167
- name: F1 (weighted) type: f1 value: 0.7966
- name: F1 (macro) type: f1 value: 0.7966
- name: F1 (micro) type: f1 value: 0.8167
- name: Precision (weighted) type: precision value: 0.8441
- name: Recall (weighted) type: recall value: 0.8167
- task:
type: text-classification
name: Medical Diagnosis Classification (English) — TEST VERSION
dataset:
name: NeuronZero/Symptom2Disease
type: NeuronZero/Symptom2Disease
metrics:
🏥 Medical Diagnosis Classifier (EN) — TEST VERSION
⚠️ TEST VERSION / EXPERIMENTAL MODEL
This is an experimental test version of a medical diagnosis classifier. NOT intended for clinical use, self-diagnosis, or medical decision-making. Provided AS-IS for research and educational purposes only.
🚨 Important Notice
THIS IS A TEST VERSION of a fine-tuned Bio_ClinicalBERT model for classifying patient symptom descriptions into medical diagnoses in English.
⚠️ Test Version Limitations
- 🧪 Experimental quality: Trained on limited synthetic data (1,200 examples)
- 🔬 Not clinically validated: Results may be inaccurate or misleading
- 📉 ~18% error rate: Significant chance of wrong predictions
- 🌍 Limited scope: Only 24 medical conditions
- 🚫 No medical authority: Not approved for use in any healthcare setting
📋 Model Description
The model takes a natural-language description of patient symptoms as input and returns the most likely diagnosis (or top-N diagnoses with confidence scores).
- Base model:
emilyalsentzer/Bio_ClinicalBERT - Dataset: NeuronZero/Symptom2Disease
- Number of classes: 24
- Max input length: 128 tokens
- Framework: PyTorch / Hugging Face Transformers
- Status: 🧪 TEST VERSION
Supported Diagnoses (Test Version)
| # | Diagnosis | # | Diagnosis |
|---|---|---|---|
| 1 | Acne | 13 | Impetigo |
| 2 | Allergy | 14 | Jaundice |
| 3 | Arthritis | 15 | Malaria |
| 4 | Bronchial Asthma | 16 | Migraine |
| 5 | Cervical spondylosis | 17 | Pneumonia |
| 6 | Chicken pox | 18 | Psoriasis |
| 7 | Common Cold | 19 | Typhoid |
| 8 | Dengue | 20 | Varicose Veins |
| 9 | Diabetes | 21 | allergy |
| 10 | Dimorphic Hemorrhoids | 22 | diabetes |
| 11 | Drug reaction | 23 | drug reaction |
| 12 | Fungal infection | 24 | gastroesophageal reflux disease |
📊 Test Version Metrics
| Metric | Value |
|---|---|
| Accuracy | 0.8167 |
| F1 (weighted) | 0.7966 |
| F1 (macro) | 0.7966 |
| F1 (micro) | 0.8167 |
| Precision (weighted) | 0.8441 |
| Recall (weighted) | 0.8167 |
Per-Class Performance (Test Version)
| Diagnosis | Precision | Recall | F1-Score |
|---|---|---|---|
| Acne | 1.000 | 1.000 | 1.000 |
| Arthritis | 1.000 | 1.000 | 1.000 |
| Bronchial Asthma | 1.000 | 0.800 | 0.889 |
| Cervical spondylosis | 0.625 | 1.000 | 0.769 |
| Chicken pox | 0.800 | 0.800 | 0.800 |
| Common Cold | 0.556 | 1.000 | 0.714 |
| Dengue | 1.000 | 0.600 | 0.750 |
| Dimorphic Hemorrhoids | 1.000 | 1.000 | 1.000 |
| Fungal infection | 1.000 | 1.000 | 1.000 |
| Hypertension | 1.000 | 0.600 | 0.750 |
| Impetigo | 1.000 | 1.000 | 1.000 |
| Jaundice | 1.000 | 1.000 | 1.000 |
| Malaria | 1.000 | 1.000 | 1.000 |
| Migraine | 1.000 | 0.800 | 0.889 |
| Pneumonia | 0.833 | 1.000 | 0.909 |
| Psoriasis | 0.714 | 1.000 | 0.833 |
| Typhoid | 0.714 | 1.000 | 0.833 |
| Varicose Veins | 1.000 | 0.800 | 0.889 |
| allergy | 1.000 | 0.400 | 0.571 |
| diabetes | 0.800 | 0.800 | 0.800 |
| drug reaction | 1.000 | 0.200 | 0.333 |
| gastroesophageal reflux disease | 0.417 | 1.000 | 0.588 |
| peptic ulcer disease | 0.000 | 0.000 | 0.000 |
| urinary tract infection | 0.800 | 0.800 | 0.800 |
Known Issues (Test Version)
- ❌ Peptic ulcer disease: Model failed to learn this class (0% recall)
- ⚠️ Drug reaction: Very low recall (20%) — model misses 80% of cases
- ⚠️ Allergy: Low recall (40%) — model misses 60% of cases
- ⚠️ GERD: Low precision (42%) — many false positives
🚀 Usage (For Research Only)
⚠️ WARNING: This is a TEST VERSION. Do not use for real medical decisions.
Using pipeline (recommended)
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="ilyali034/bert-medical-diagnosis-en",
top_k=3
)
# FOR RESEARCH ONLY — NOT FOR MEDICAL USE
result = classifier("I have a severe headache, nausea, and sensitivity to light for two days")
print(result)
# [[{'label': 'Migraine', 'score': 0.85}, {'label': 'Common Cold', 'score': 0.08}, ...]]