lenskit.metrics.RankWeight#
- class lenskit.metrics.RankWeight#
Bases:
ABC
Base class for rank weighting models.
This returns multiplicative weights, such that scores should be multiplied by the weights in order to produce weighted scores.
- Stability:
- Caller (see Stability Levels).
- __init__()#
Methods
__init__
()log_weight
(ranks)Compute the (natural) log of the discount for the specified ranks.
Get the sum of the infinite series of this discount function, if known.
weight
(ranks)Compute the discount for the specified ranks.
- abstractmethod weight(ranks)#
Compute the discount for the specified ranks.
Ranks must start with 1.
- log_weight(ranks)#
Compute the (natural) log of the discount for the specified ranks.
Ranks must start with 1.