ek.metrics.fields#
Field-level metric for record / dict-shaped extractions.
Compares two flat records key by key into precision / recall / F1, with a wrong
value counting as both a spurious prediction and a missed gold (the conventional
slot-error accounting). It is dependency-free, so it ships in core for the common
“compare these two extracted records” case; the tag-sequence span metrics
(seqeval / nervaluate, with their explicit match schemes) and nested
metrics (ANLS*) arrive behind the [metrics] extra – see misc/docs/ek_02.
Aggregation is micro-averaged over the corpus (sum TP/FP/FN, then divide), carried
in each Score’s detail so evaluate() does it
correctly rather than averaging per-record F1s.
Classes
|
Per-field precision/recall/F1 for two dict records. |