|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Rescorer<T>
A Rescorer
simply assigns a new "score" to a thing like an ID of an item or user which a
Recommender
is considering returning as a top recommendation. It may be used to arbitrarily re-rank
the results according to application-specific logic before returning recommendations. For example, an
application may want to boost the score of items in a certain category just for one request.
A Rescorer
can also exclude a thing from consideration entirely by returning true
from
isFiltered(Object)
.
Method Summary | |
---|---|
boolean |
isFiltered(T thing)
Returns true to exclude the given thing. |
double |
rescore(T thing,
double originalScore)
|
Method Detail |
---|
double rescore(T thing, double originalScore)
thing
- thing to rescoreoriginalScore
- original score
Double.NaN
to indicate that this should be excluded entirelyboolean isFiltered(T thing)
true
to exclude the given thing.
thing
- the thing to filter
true
to exclude, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |