mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Save raw scores in evaluate output
This commit is contained in:
parent
dd207ca6d0
commit
563a21834e
|
@ -93,6 +93,7 @@ def evaluate(
|
||||||
"SPEED": "speed",
|
"SPEED": "speed",
|
||||||
}
|
}
|
||||||
results = {}
|
results = {}
|
||||||
|
data = {}
|
||||||
for metric, key in metrics.items():
|
for metric, key in metrics.items():
|
||||||
if key in scores:
|
if key in scores:
|
||||||
if key == "cats_score":
|
if key == "cats_score":
|
||||||
|
@ -101,7 +102,7 @@ def evaluate(
|
||||||
results[metric] = f"{scores[key]:.0f}"
|
results[metric] = f"{scores[key]:.0f}"
|
||||||
else:
|
else:
|
||||||
results[metric] = f"{scores[key]*100:.2f}"
|
results[metric] = f"{scores[key]*100:.2f}"
|
||||||
data = {re.sub(r"[\s/]", "_", k.lower()): v for k, v in results.items()}
|
data[re.sub(r"[\s/]", "_", key.lower())] = scores[key]
|
||||||
|
|
||||||
msg.table(results, title="Results")
|
msg.table(results, title="Results")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user