Spaces:
Sleeping
Sleeping
Update f_beta.py
Browse files
f_beta.py
CHANGED
@@ -95,8 +95,9 @@ class F_Beta(evaluate.Metric):
|
|
95 |
)
|
96 |
|
97 |
|
98 |
-
def _compute(self, predictions, references, labels=None, pos_label=1, average="binary", sample_weight=None
|
99 |
score = fbeta_score(
|
100 |
-
references, predictions, labels=labels, pos_label=pos_label, average=average, sample_weight=sample_weight
|
101 |
)
|
102 |
-
return {"f_beta_score": float(score) if score.size == 1 else score}
|
|
|
|
95 |
)
|
96 |
|
97 |
|
98 |
+
def _compute(self, predictions, references, beta, labels=None, pos_label=1, average="binary", sample_weight=None):
|
99 |
score = fbeta_score(
|
100 |
+
references, predictions, beta, labels=labels, pos_label=pos_label, average=average, sample_weight=sample_weight
|
101 |
)
|
102 |
+
return {"f_beta_score": float(score) if score.size == 1 else score}
|
103 |
+
|