Commit
·
d89167d
1
Parent(s):
790803c
Update README.md
Browse files
README.md
CHANGED
@@ -14,7 +14,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
14 |
|
15 |
# best_model
|
16 |
|
17 |
-
This model is a fine-tuned version of [microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext](https://huggingface.co/microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext) on
|
18 |
It achieves the following results on the evaluation set:
|
19 |
- Loss: 0.2833
|
20 |
- Accuracy: 0.8942
|
@@ -25,7 +25,32 @@ More information needed
|
|
25 |
|
26 |
## Intended uses & limitations
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
## Training and evaluation data
|
31 |
|
|
|
14 |
|
15 |
# best_model
|
16 |
|
17 |
+
This model is a fine-tuned version of [microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext](https://huggingface.co/microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext) on the [PubMed200kRCT](https://github.com/Franck-Dernoncourt/pubmed-rct/tree/master/PubMed_200k_RCT) dataset.
|
18 |
It achieves the following results on the evaluation set:
|
19 |
- Loss: 0.2833
|
20 |
- Accuracy: 0.8942
|
|
|
25 |
|
26 |
## Intended uses & limitations
|
27 |
|
28 |
+
The model can be used for text classification tasks of Randomized Controlled Trials that does not have any structure. The text can be classified as one of the following:
|
29 |
+
* BACKGROUND
|
30 |
+
* CONCLUSIONS
|
31 |
+
* METHODS
|
32 |
+
* OBJECTIVE
|
33 |
+
* RESULTS
|
34 |
+
|
35 |
+
The model can be directly used like this:
|
36 |
+
|
37 |
+
```python
|
38 |
+
from transformers import TextClassificationPipeline
|
39 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
40 |
+
model = AutoModelForSequenceClassification.from_pretrained("pritamdeka/PubMedBert-PubMed200kRCT")
|
41 |
+
tokenizer = AutoTokenizer.from_pretrained("pritamdeka/PubMedBert-PubMed200kRCT")
|
42 |
+
pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True)
|
43 |
+
pipe("Treatment of 12 healthy female subjects with CDCA for 2 days resulted in increased BAT activity.")
|
44 |
+
```
|
45 |
+
Results will be shown as follows:
|
46 |
+
|
47 |
+
```python
|
48 |
+
[[{'label': 'BACKGROUND', 'score': 0.0026365036610513926},
|
49 |
+
{'label': 'CONCLUSIONS', 'score': 0.052317846566438675},
|
50 |
+
{'label': 'METHODS', 'score': 0.007398751098662615},
|
51 |
+
{'label': 'OBJECTIVE', 'score': 0.0008019638480618596},
|
52 |
+
{'label': 'RESULTS', 'score': 0.9368449449539185}]]
|
53 |
+
```
|
54 |
|
55 |
## Training and evaluation data
|
56 |
|