Text Classification
Transformers
PyTorch
English
bert
medical
cardiology
emergency-medicine
classification
Eval Results (legacy)
text-embeddings-inference
Instructions to use monajm36/ohca-classifier-v9 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use monajm36/ohca-classifier-v9 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="monajm36/ohca-classifier-v9")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("monajm36/ohca-classifier-v9") model = AutoModelForSequenceClassification.from_pretrained("monajm36/ohca-classifier-v9", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,745 Bytes
1cace6f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | ---
language:
- en
license: mit
library_name: transformers
tags:
- medical
- cardiology
- emergency-medicine
- classification
- bert
datasets:
- MIMIC-III
metrics:
- accuracy
- f1
- auc
model-index:
- name: OHCA-Classifier-V9
results:
- task:
type: text-classification
name: Out-of-Hospital Cardiac Arrest Detection
metrics:
- type: accuracy
value: 0.86
- type: f1
value: 0.80
- type: auc
value: 0.905
---
# OHCA Classifier V9
## Model Description
This model classifies clinical notes to identify Out-of-Hospital Cardiac Arrest (OHCA) cases. It's based on BiomedNLP-PubMedBERT and trained on MIMIC-III data.
## Model Performance
- **AUC-ROC**: 0.905
- **Sensitivity**: 80%
- **Specificity**: 95%
- **F1-Score**: 0.80
- **Optimal Threshold**: 0.120
## Usage
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model
tokenizer = AutoTokenizer.from_pretrained("monajm36/ohca-classifier-v9")
model = AutoModelForSequenceClassification.from_pretrained("monajm36/ohca-classifier-v9")
# Predict
def predict_ohca(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)
return probs[0][1].item() # OHCA probability
# Example
text = "Chief Complaint: Cardiac arrest. HPI: Patient found unresponsive..."
prob = predict_ohca(text)
print(f"OHCA Probability: {prob:.3f}")
```
## Training Data
- **Dataset**: MIMIC-III
- **Samples**: 330 clinical notes
- **Classes**: Binary (OHCA vs Non-OHCA)
## Disclaimer
This model is for research purposes only. Not intended for clinical decision-making.
|