## org.apache.mahout.cf.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 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

### rescore

    double rescore(T thing,
                   double originalScore)

  Parameters:
    `thing` - thing to rescore
    `originalScore` - original score
  Returns:
    modified score, or `Double.NaN` to indicate that this should be excluded entirely

### isFiltered

    boolean isFiltered(T thing)

  Returns `true` to exclude the given thing.

  Parameters:
    `thing` - the thing to filter
  Returns:
    `true` to exclude, `false` otherwise

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.