monajm36 commited on
Commit
bb69800
·
verified ·
1 Parent(s): 30ac906

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +91 -3
README.md CHANGED
@@ -1,3 +1,91 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+ ---
5
+ license: mit
6
+ language:
7
+ - en
8
+ library_name: transformers
9
+ pipeline_tag: text-classification
10
+ base_model: microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract
11
+ tags:
12
+ - clinical
13
+ - healthcare
14
+ - emergency-medicine
15
+ - OHCA
16
+ - PubMedBERT
17
+ - MIMIC
18
+ - patient-level-split
19
+ model-index:
20
+ - name: OHCA Classifier v8 (PubMedBERT fine-tuned)
21
+ results:
22
+ - task:
23
+ type: text-classification
24
+ name: Binary OHCA detection (OHCA vs non-OHCA)
25
+ dataset:
26
+ name: Internal (MIMIC-derived discharge notes)
27
+ type: text
28
+ split: test (patient-level)
29
+ metrics:
30
+ - type: recall
31
+ name: Sensitivity (Recall)
32
+ value: 1.000
33
+ - type: specificity
34
+ name: Specificity
35
+ value: 0.879
36
+ - type: precision
37
+ name: PPV (Precision)
38
+ value: 0.562
39
+ - type: npv
40
+ name: NPV
41
+ value: 1.000
42
+ - type: f1
43
+ name: F1-score
44
+ value: 0.720
45
+ - type: auc
46
+ name: ROC-AUC
47
+ value: 0.971
48
+ ---
49
+
50
+ # OHCA Classifier v8 — PubMedBERT fine-tuned for cardiac arrest detection
51
+
52
+ **Author:** Mona Moukaddem
53
+ **Model:** `monajm36/ohca-classifier-v8`
54
+ **Task:** Binary text classification — *Out-of-Hospital Cardiac Arrest (OHCA) vs Non-OHCA*
55
+ **Base model:** `microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract`
56
+
57
+ This model predicts whether a discharge note likely describes **out-of-hospital cardiac arrest (OHCA)**. It is fine-tuned from PubMedBERT on MIMIC-derived discharge notes using **patient-level splits** to prevent leakage.
58
+
59
+ > ⚠️ For research and decision support only. Not a substitute for clinical judgment.
60
+
61
+ ---
62
+
63
+ ## What’s included
64
+ - A multi-head fine-tuned classifier with a dedicated **binary OHCA head**
65
+ - Trained tokenizer and configuration
66
+ - Recommended **threshold guidance** for different clinical goals
67
+
68
+ ---
69
+
70
+ ## How to use
71
+
72
+ ### Quick start (Transformers)
73
+ ```python
74
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
75
+ import torch
76
+
77
+ model_id = "monajm36/ohca-classifier-v8"
78
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
79
+ model = AutoModelForSequenceClassification.from_pretrained(model_id)
80
+ model.eval()
81
+
82
+ text = """Chief Complaint: cardiac arrest
83
+ History of Present Illness: Patient found unresponsive at home... ROSC after EMS CPR..."""
84
+
85
+ inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)
86
+ with torch.no_grad():
87
+ logits = model(**inputs).logits
88
+ probs = torch.softmax(logits, dim=-1).squeeze()
89
+ p_ohca = float(probs[1]) # index 1 = OHCA, index 0 = Non-OHCA
90
+
91
+ print({"p_ohca": p_ohca})