org.apache.mahout.cf.taste.recommender
Interface IDRescorer

All Known Implementing Classes:
NullRescorer

public interface IDRescorer

A Rescorer which operates on long primitive IDs, rather than arbitrary Objects. This is provided since most uses of this interface in the framework take IDs (as long) as an argument, and so this can be used to avoid unnecessary boxing/unboxing.


Method Summary
 boolean isFiltered(long id)
          Returns true to exclude the given thing.
 double rescore(long id, double originalScore)
           
 

Method Detail

rescore

double rescore(long id,
               double originalScore)
Parameters:
id - ID of thing (user, item, etc.) to rescore
originalScore - original score
Returns:
modified score, or Double.NaN to indicate that this should be excluded entirely

isFiltered

boolean isFiltered(long id)
Returns true to exclude the given thing.

Parameters:
id - ID of thing (user, item, etc.) to rescore
Returns:
true to exclude, false otherwise


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