Update metrics/bart_score.py
Browse files- metrics/bart_score.py +3 -3
metrics/bart_score.py
CHANGED
@@ -23,10 +23,10 @@ def get_scorers():
|
|
23 |
|
24 |
|
25 |
def compute_bart_score_for_scorer(predictions, references, scorer_name, scorer):
|
26 |
-
#precisions = np.array(scorer.score(references, predictions, batch_size=
|
27 |
-
recalls = np.array(scorer.score(predictions, references, batch_size=
|
28 |
#f_scores = 0.5 * (precisions + recalls)
|
29 |
-
baselines = np.array(scorer.score(references, references, batch_size=
|
30 |
normalized = baselines / recalls
|
31 |
diffs = recalls - baselines
|
32 |
expdiffs = np.exp(diffs)
|
|
|
23 |
|
24 |
|
25 |
def compute_bart_score_for_scorer(predictions, references, scorer_name, scorer):
|
26 |
+
#precisions = np.array(scorer.score(references, predictions, batch_size=4))
|
27 |
+
recalls = np.array(scorer.score(predictions, references, batch_size=4))
|
28 |
#f_scores = 0.5 * (precisions + recalls)
|
29 |
+
baselines = np.array(scorer.score(references, references, batch_size=4))
|
30 |
normalized = baselines / recalls
|
31 |
diffs = recalls - baselines
|
32 |
expdiffs = np.exp(diffs)
|