aakorolyova commited on
Commit
4922c50
·
1 Parent(s): 711df7e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -29
README.md CHANGED
@@ -1,47 +1,69 @@
1
- ---
2
- tags:
3
- - generated_from_keras_callback
4
- model-index:
5
- - name: primary_outcome_extraction
6
- results: []
7
- ---
8
 
9
- <!-- This model card has been generated automatically according to the information Keras had access to. You should
10
- probably proofread and complete it, then remove this comment. -->
11
 
12
- # primary_outcome_extraction
13
 
14
- This model was trained from scratch on an unknown dataset.
15
- It achieves the following results on the evaluation set:
16
 
 
17
 
18
- ## Model description
19
 
20
- More information needed
21
 
22
- ## Intended uses & limitations
23
 
24
- More information needed
25
 
26
- ## Training and evaluation data
27
 
28
- More information needed
29
 
30
- ## Training procedure
31
 
32
- ### Training hyperparameters
 
33
 
34
- The following hyperparameters were used during training:
35
- - optimizer: None
36
- - training_precision: float32
37
 
38
- ### Training results
39
 
 
40
 
 
41
 
42
- ### Framework versions
43
 
44
- - Transformers 4.16.1
45
- - TensorFlow 2.5.0
46
- - Datasets 1.10.2
47
- - Tokenizers 0.12.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h1>Model description</h1>
 
 
 
 
 
 
2
 
3
+ This is a fine-tuned BioBERT model for extracting primary outcomes from articles reporting clinical trials.
4
+ This is the second version of the model; the original model development was reported in:
5
 
6
+ Anna Koroleva, Sanjay Kamath, Patrick Paroubek. Extracting primary and reported outcomes from articles reporting randomized controlled trials using pre-trained deep language representations. Preprint: https://easychair.org/publications/preprint/qpml
7
 
8
+ The original work was conducted within the scope of the Assisted authoring for avoiding inadequate claims in scientific reporting PhD project of the Methods for Research on Research (MiRoR, http://miror-ejd.eu/) program.
 
9
 
10
+ Model creator: Anna Koroleva
11
 
 
12
 
13
+ <h1>Intended uses & limitations</h1>
14
 
15
+ The model is intended to be used for extracting primary outcomes from texts of clinical trials.
16
 
17
+ The main limitation is that the model was trained on a fairly small (2000 sentences) sample of data annotated by a single annotator. Annotating more data or involvig more annotators was not possiblw within the PhD project.
18
 
19
+ Another possible issue with the model use if the complex nature of outcomes: a typical description of an outcome can include the outcome name, measurement tool, timepoints, e.g. "Health-Related Quality of Life at 12 months, measured using the Assessment of Quality of Life instrument". Ideally, this should be broken into 3 separate entities ("Health-Related Quality of Life" - outcome", "at 12 months" - timepoint", "the Assessment of Quality of Life instrument" - measurement tool), and relation between the three should be extracted to capture all the outcome-related information. However, in our annotation we annotated this type of examples as a sinale outcome entity.
20
 
 
21
 
22
+ <h1>How to use</h1>
23
 
24
+ The model should be used with the BioBERT tokeniser. A sample code for getting model predictions is below:
25
+ ```
26
 
27
+ import numpy as np
 
 
28
 
29
+ from transformers import AutoTokenizer
30
 
31
+ from transformers import AutoModelForTokenClassification
32
 
33
+ from transformers import AutoModelForSequenceClassification
34
 
 
35
 
36
+ tokenizer = AutoTokenizer.from_pretrained('dmis-lab/biobert-v1.1')
37
+
38
+ model = AutoModelForTokenClassification.from_pretrained(r'aakorolyova/primary_outcome_extraction')
39
+
40
+
41
+ text = 'Primary endpoints were overall survival in patients with oesophageal squamous cell carcinoma and PD-L1 combined positive score (CPS) of 10 or more, and overall survival and progression-free survival in patients with oesophageal squamous cell carcinoma, PD-L1 CPS of 10 or more, and in all randomised patients.'
42
+
43
+ encoded_input = tokenizer(text, padding=True, truncation=True, max_length=2000, return_tensors='pt')
44
+
45
+ output = model(**encoded_input)['logits']
46
+
47
+ output = np.argmax(output.detach().numpy(), axis=2)
48
+
49
+ print(output)
50
+ ```
51
+
52
+ Some more useful functions can be found in or Github repository: https://github.com/aakorolyova/DeSpin-2.0
53
+
54
+
55
+ <h1>Training data</h1>
56
+
57
+ Training data can be found in https://github.com/aakorolyova/DeSpin-2.0/tree/main/data/Primary_Outcomes
58
+
59
+ <h1>Training procedure</h1>
60
+
61
+ The model was fine-tuned using Huggingface Trainer API. Training scripts can be found in https://github.com/aakorolyova/DeSpin-2.0
62
+
63
+ <h1>Evaluation</h1>
64
+
65
+ Precision: 74.41%
66
+
67
+ Recall: 88.7%
68
+
69
+ F1: 80.93%