org.apache.mahout.cf.taste.impl.model
Class AbstractDataModel

java.lang.Object
  extended by org.apache.mahout.cf.taste.impl.model.AbstractDataModel
All Implemented Interfaces:
Serializable, Refreshable, DataModel
Direct Known Subclasses:
FileDataModel, GenericBooleanPrefDataModel, GenericDataModel

public abstract class AbstractDataModel
extends Object
implements DataModel

Contains some features common to all implementations.

See Also:
Serialized Form

Constructor Summary
protected AbstractDataModel()
           
 
Method Summary
 float getMaxPreference()
           
 float getMinPreference()
           
protected  void setMaxPreference(float maxPreference)
           
protected  void setMinPreference(float minPreference)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.mahout.cf.taste.model.DataModel
getItemIDs, getItemIDsFromUser, getNumItems, getNumUsers, getNumUsersWithPreferenceFor, getNumUsersWithPreferenceFor, getPreferencesForItem, getPreferencesFromUser, getPreferenceTime, getPreferenceValue, getUserIDs, hasPreferenceValues, removePreference, setPreference
 
Methods inherited from interface org.apache.mahout.cf.taste.common.Refreshable
refresh
 

Constructor Detail

AbstractDataModel

protected AbstractDataModel()
Method Detail

getMaxPreference

public float getMaxPreference()
Specified by:
getMaxPreference in interface DataModel
Returns:
the maximum preference value that is possible in the current problem domain being evaluated. For example, if the domain is movie ratings on a scale of 1 to 5, this should be 5. While a Recommender may estimate a preference value above 5.0, it isn't "fair" to consider that the system is actually suggesting an impossible rating of, say, 5.4 stars. In practice the application would cap this estimate to 5.0. Since evaluators evaluate the difference between estimated and actual value, this at least prevents this effect from unfairly penalizing a Recommender

setMaxPreference

protected void setMaxPreference(float maxPreference)

getMinPreference

public float getMinPreference()
Specified by:
getMinPreference in interface DataModel
See Also:
DataModel.getMaxPreference()

setMinPreference

protected void setMinPreference(float minPreference)


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