maksymdolgikh commited on
Commit
977ba1e
1 Parent(s): b88fb80

readme fix

Browse files
Files changed (2) hide show
  1. README.md +3 -4
  2. seqeval_with_fbeta.py +1 -1
README.md CHANGED
@@ -111,8 +111,7 @@ Maximal values (full match) :
111
  >>> references = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
112
  >>> results = seqeval.compute(predictions=predictions, references=references)
113
  >>> print(results)
114
- {'MISC': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 1}, 'PER': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 1}, 'overall_precision': 1.0, 'overall_recall': 1.0, 'overall_f1': 1.0, 'overall_accuracy': 1.0}
115
-
116
  ```
117
 
118
  Minimal values (no match):
@@ -123,7 +122,7 @@ Minimal values (no match):
123
  >>> references = [['B-MISC', 'O', 'O'], ['I-PER', '0', 'I-PER']]
124
  >>> results = seqeval.compute(predictions=predictions, references=references)
125
  >>> print(results)
126
- {'MISC': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 1}, 'PER': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 2}, '_': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 1}, 'overall_precision': 0.0, 'overall_recall': 0.0, 'overall_f1': 0.0, 'overall_accuracy': 0.0}
127
  ```
128
 
129
  Partial match:
@@ -134,7 +133,7 @@ Partial match:
134
  >>> references = [['O', 'O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
135
  >>> results = seqeval.compute(predictions=predictions, references=references)
136
  >>> print(results)
137
- {'MISC': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 1}, 'PER': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 1}, 'overall_precision': 0.5, 'overall_recall': 0.5, 'overall_f1': 0.5, 'overall_accuracy': 0.8}
138
  ```
139
 
140
  ## Limitations and bias
 
111
  >>> references = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
112
  >>> results = seqeval.compute(predictions=predictions, references=references)
113
  >>> print(results)
114
+ {'MISC': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 1}, 'PER': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 1}, 'overall': {'precision': 1.0, 'recall': 1.0, 'f1-score': 1.0, 'accuracy': 1.0}}
 
115
  ```
116
 
117
  Minimal values (no match):
 
122
  >>> references = [['B-MISC', 'O', 'O'], ['I-PER', '0', 'I-PER']]
123
  >>> results = seqeval.compute(predictions=predictions, references=references)
124
  >>> print(results)
125
+ {'MISC': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 1}, 'PER': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 2}, '_': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 1}, 'overall': {'precision': 0.0, 'recall': 0.0, 'f1-score': 0.0, 'accuracy': 0.0}}
126
  ```
127
 
128
  Partial match:
 
133
  >>> references = [['O', 'O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
134
  >>> results = seqeval.compute(predictions=predictions, references=references)
135
  >>> print(results)
136
+ {'MISC': {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 1}, 'PER': {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 1}, 'overall': {'precision': 0.5, 'recall': 0.5, 'f1-score': 0.5, 'accuracy': 0.8}}
137
  ```
138
 
139
  ## Limitations and bias
seqeval_with_fbeta.py CHANGED
@@ -94,7 +94,7 @@ Examples:
94
  >>> predictions = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
95
  >>> references = [['O', 'O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
96
  >>> seqeval = evaluate.load("seqeval")
97
- >>> results = seqeval.compute(predictions=predictions, references=references, beta=1.0)
98
  >>> print(list(results.keys()))
99
  ['MISC', 'PER', 'overall']
100
  >>> print(results["overall"]["f1"])
 
94
  >>> predictions = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
95
  >>> references = [['O', 'O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
96
  >>> seqeval = evaluate.load("seqeval")
97
+ >>> results = seqeval.compute(predictions=predictions, references=references, beta=1)
98
  >>> print(list(results.keys()))
99
  ['MISC', 'PER', 'overall']
100
  >>> print(results["overall"]["f1"])