fuse_by_rank#

scikitplot.corpus.fuse_by_rank(results, *, rrf_k=60, weights=None, top_k=10)[source]#

Combine leg results by reciprocal rank fusion.

Parameters:
resultsiterable of LegResult

One entry per leg. Failed legs contribute nothing but are harmless.

rrf_kint, optional

The standard RRF constant. Default 60.

weightsdict, optional

Per-leg weight; unlisted legs weigh 1.0.

top_kint, optional

Number of fused hits to return.

Returns:
list of (hit, fused_score, contributions)

Sorted by descending fused score.

Parameters:
Return type:

list[tuple[Any, float, tuple[LegContribution, …]]]

Notes

Developer. Rank fusion is the default combiner because score-space fusion needs a validated normalization that does not exist for most metrics (ADR-R07-003). The arithmetic is unchanged from the implementation review run R09 verified; what is new is that each hit’s contributions are returned rather than discarded, so the fused score can be recomputed and explained from the result.

Fusion keys on doc_id, never on a row offset – the property that kept F-R01-07’s positional coupling out of the fusion path.