mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 01:04:34 +03:00
Fix cat scoring (?)
This commit is contained in:
parent
146af1dc17
commit
165ef60aa6
|
@ -461,7 +461,7 @@ class Scorer:
|
||||||
if gold_score is not None and gold_score > 0:
|
if gold_score is not None and gold_score > 0:
|
||||||
f_per_type[gold_label].fn += 1
|
f_per_type[gold_label].fn += 1
|
||||||
elif pred_cats:
|
elif pred_cats:
|
||||||
pred_label, pred_score = max(pred_cats, key=lambda it: it[1])
|
pred_label, pred_score = max(pred_cats.items(), key=lambda it: it[1])
|
||||||
if pred_score >= threshold:
|
if pred_score >= threshold:
|
||||||
f_per_type[pred_label].fp += 1
|
f_per_type[pred_label].fp += 1
|
||||||
micro_prf = PRFScore()
|
micro_prf = PRFScore()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user