row56 commited on
Commit
faadf80
·
verified ·
1 Parent(s): db720ec

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +69 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - text-classification
4
+ - medical
5
+ - prototypical-networks
6
+ - transformers
7
+ library_name: transformers
8
+ language: en
9
+ license: mit
10
+ datasets:
11
+ - your_dataset_name_here
12
+ model-index:
13
+ - name: ProtoPatient
14
+ results:
15
+ - task:
16
+ type: multi-label-classification
17
+ dataset:
18
+ name: your_dataset_name_here
19
+ type: text
20
+ metrics:
21
+ - name: Accuracy
22
+ type: accuracy
23
+ value: 0.XX # Update with real value
24
+ - name: F1-score
25
+ type: f1
26
+ value: 0.XX # Update with real value
27
+ ---
28
+
29
+
30
+
31
+ # ProtoPatient Model for Multi-Label Classification
32
+
33
+ This repository contains the implementation of the ProtoPatient model, designed for multi-label classification tasks. It is based on a transformer model and integrates a prototype-based learning approach.
34
+
35
+ ProtoPatient is a novel method using prototypical networks and label-wise attention for diagnosis prediction from clinical text, ensuring both accuracy and interpretability by making predictions based on text segments similar to prototypical patients. Evaluated on two clinical datasets, it outperforms existing baselines and provides explanations that are understandable and valuable for doctors.
36
+
37
+ ## **Repository Structure**
38
+ ```
39
+ ProtoPatient/
40
+ │── proto_model/
41
+ │ ├── proto.py
42
+ │ ├── utils.py
43
+ │ ├── metrics.py
44
+ │ ├── __init__.py
45
+ │── config.json
46
+ │── model.safetensors
47
+ │── tokenizer.json
48
+ │── tokenizer_config.json
49
+ │── vocab.txt
50
+ │── README.md
51
+ │── .gitattributes
52
+ ```
53
+
54
+ ## **How to Use the Model**
55
+
56
+ ### **1. Install Dependencies**
57
+ Ensure you have `transformers` and `torch` installed:
58
+ ```bash
59
+ pip install transformers torch
60
+ ```
61
+
62
+ ### **2. Load the Model**
63
+ You can load the model as follows:
64
+ ```python
65
+ from transformers import AutoModel
66
+
67
+ model = AutoModel.from_pretrained("row56/ProtoPatient")
68
+ print("✅ Model with weights loaded successfully!")
69
+ ```