Downloads · 30 days
3
6% of all-time downloads
sshan95/clinical-medical-comprehension-model
clinical-medical-comprehension-model is a machine learning model from sshan95. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a state-of-the-art clinical comprehension model for automated medical coding, fine-tuned on the MIMIC-IV dataset. The model uses a sophisticated multi-pathway architecture specifically designed for understandi…
Downloads · 30 days
3
6% of all-time downloads
All-time downloads
52
Public
Repo size
453 MB
Likes
0
Public
Click a slice to open those files.
.bin453 MB · 100%
From the Hugging Face model README
This is a state-of-the-art clinical comprehension model for automated medical coding, fine-tuned on the MIMIC-IV dataset. The model uses a sophisticated multi-pathway architecture specifically designed for understanding clinical narratives and predicting medical codes with clinical reasoning.
The model features advanced clinical comprehension:
🧠 Clinical Comprehension: Understanding medical reasoning patterns
🎯 High Precision: 30.4% precision for reliable coding assistance
🌈 Code Diversity: Uses 38.3% of available codes, avoiding frequency bias
⚖️ Balanced Performance: Strong recall (32.7%) with maintained precision
🏥 Commercial Ready: Suitable for medical coding assistance applications
from transformers import AutoTokenizer
import torch
import pickle
import numpy as np
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("sshan95/clinical-medical-coding-comprehension")
# Load label encoder
with open("label_encoder.pkl", "rb") as f:
label_encoder = pickle.load(f)
# Load classes
with open("classes.json", "r") as f:
classes = json.load(f)
# Example clinical text
clinical_text = '''
Patient presents with acute chest pain and shortness of breath.
History of hypertension and diabetes. Physical exam reveals elevated blood pressure.
ECG shows ST elevation. Troponin levels elevated.
Diagnosed with acute myocardial infarction.
Initiated on aspirin, metoprolol, and heparin.
'''
# Preprocess and tokenize
inputs = tokenizer(
clinical_text,
return_tensors="pt",
truncation=True,
padding=True,
max_length=384
)
# Get predictions (load full model first)
# with torch.no_grad():
# outputs = model(**inputs)
# predictions = (outputs > 0.15).float() # Use optimal threshold
# predicted_codes = [classes[i] for i in torch.where(predictions[0])[0]]
This model is designed for:
If you use this model, please cite:
With 31.5% F1 score and clinical comprehension capabilities, this model demonstrates:
Perfect for hospitals, medical coding companies, and healthcare AI applications! 🏥✨