public final class MultiRescorer extends Object implements Rescorer
Rescorer
s.
It will filter an item if any of the given instances filter it, and will rescore by applying
the rescorings in the given order.MultiRescorerProvider
Modifier and Type | Method and Description |
---|---|
boolean |
isFiltered(String itemID) |
static Rescorer |
of(Rescorer... rescorers) |
double |
rescore(String itemID,
double value) |
public static Rescorer of(Rescorer... rescorers)
rescorers
- Rescorer
s to aggregateRescorer
which combines the rescoring of the given implementationsIllegalArgumentException
- if rescorers
is empty or nullpublic double rescore(String itemID, double value)
rescore
in interface Rescorer
itemID
- ID of item to rescorevalue
- original score from the recommenderDouble.NaN
to exclude the item from recommendationpublic boolean isFiltered(String itemID)
isFiltered
in interface Rescorer
itemID
- of item to consider for filteringCopyright © 2014–2018. All rights reserved.