lenskit.metrics.reranking#

LensKit reranking metrics.

Functions#

least_item_promoted(reference, reranked[, n])

Compute the Least Item Promoted (LIP) metric.

rank_biased_overlap(reference, reranked[, weight, n])

Computes the Rank Biased Overlap (RBO) between two item rankings.

Package Contents#

lenskit.metrics.reranking.least_item_promoted(reference, reranked, n=10)#

Compute the Least Item Promoted (LIP) metric.

This metric identifies the item in the top-k reranked list that had the highest (worst) rank in the reference, and returns how many positions it was promoted from beyond k.

Parameters:
Returns:

The rank distance of the least-promoted item, or NaN if the base ranking is empty.

Stability:

Experimental

Return type:

float

lenskit.metrics.reranking.rank_biased_overlap(reference, reranked, weight=None, n=10)#

Computes the Rank Biased Overlap (RBO) between two item rankings. RBO is defined by Webber et al. [WMZ10].

Parameters:
Returns:

The RBO score between 0 and 1.

Stability:

Experimental

Return type:

float