Fix scorer

This commit is contained in:
Matthew Honnibal 2020-08-24 22:17:51 +02:00
parent e1457d5806
commit 4dae195431

View File

@ -40,7 +40,7 @@ class PRFScore:
def fscore(self) -> float:
p = self.precision
r = self.recall
return (2 * ((p * r) / (p + r + 1e-100))) * 100
return (2 * ((p * r) / (p + r + 1e-100)))
def to_dict(self) -> Dict[str, float]:
return {"p": self.precision, "r": self.recall, "f": self.fscore}