com.planetj.taste.recommender
Interface Rescorer<T>
- All Known Implementing Classes:
- NullRescorer
public interface Rescorer<T>
A Rescorer simply assigns a new "score" to a thing like 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).
- Since:
- 1.1
- Author:
- Sean Owen
rescore
double rescore(T thing,
double originalScore)
- Parameters:
thing - thing (Item or
User really) to rescoreoriginalScore - original score
- Returns:
- modified score, or
Double.NaN to indicate that this should be excluded entirely
isFiltered
boolean isFiltered(T thing)