denselinkage.metrics.adjusted_metrics¶
- denselinkage.metrics.adjusted_metrics(result: LinkageResult, candidates: Sequence[CandidatePair], *, gold: LabeledPairs, k: int, directed: bool = True) AdjustedMetrics[source]¶
Decompose end-to-end recall into matcher x blocker components.
blocking_recall_at_kis the blocker’s pair-completeness@k overcandidates.matcheris the matcher’s metrics measured conditionally on blocking — recall over only the gold pairs the candidate set surfaced — sorecall_adjusted = matcher.recall * pc@kis the honest end-to-end recall, not a double-counting of the blocking loss (measuring the matcher against the full gold would already fold blocking misses in as false negatives). Precision is unaffected by the conditioning. When the matched candidate set is the top-k set used forpc@k,recall_adjustedequalslinkage_metrics(result, gold=gold).recallexactly.directedfollowslinkage_metrics/pair_completeness_at_k.