org.apache.mahout.cf.taste.model
Interface Preference

All Known Implementing Classes:
BooleanPreference, GenericPreference

public interface Preference

A encapsulates an item and a preference value, which indicates the strength of the preference for it. s are associated to users.


Method Summary
 long getItemID()
           
 long getUserID()
           
 float getValue()
           
 void setValue(float value)
          Sets the strength of the preference for this item
 

Method Detail

getUserID

long getUserID()
Returns:
ID of user who prefers the item

getItemID

long getItemID()
Returns:
item ID that is preferred

getValue

float getValue()
Returns:
strength of the preference for that item. Zero should indicate "no preference either way"; positive values indicate preference and negative values indicate dislike

setValue

void setValue(float value)
Sets the strength of the preference for this item

Parameters:
value - new preference


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.