org.apache.mahout.cf.taste.example.jester
Class JesterDataModel

java.lang.Object
  extended by org.apache.mahout.cf.taste.impl.model.AbstractDataModel
      extended by org.apache.mahout.cf.taste.impl.model.file.FileDataModel
          extended by org.apache.mahout.cf.taste.example.jester.JesterDataModel
All Implemented Interfaces:
Serializable, Refreshable, DataModel

public final class JesterDataModel
extends FileDataModel

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.mahout.cf.taste.impl.model.file.FileDataModel
DEFAULT_MIN_RELOAD_INTERVAL_MS
 
Constructor Summary
JesterDataModel()
           
JesterDataModel(File ratingsFile)
           
 
Method Summary
protected  DataModel buildModel()
           
protected  void processLine(String line, FastByIDMap<?> rawData, FastByIDMap<FastByIDMap<Long>> timestamps, boolean fromPriorData)
           
 void reload()
           
 
Methods inherited from class org.apache.mahout.cf.taste.impl.model.file.FileDataModel
determineDelimiter, getDataFile, getDelimiter, getItemIDs, getItemIDsFromUser, getMaxPreference, getMinPreference, getNumItems, getNumUsers, getNumUsersWithPreferenceFor, getNumUsersWithPreferenceFor, getPreferencesForItem, getPreferencesFromUser, getPreferenceTime, getPreferenceValue, getUserIDs, hasPreferenceValues, processFile, processFileWithoutID, processLineWithoutID, readItemIDFromString, readTimestampFromString, readUserIDFromString, refresh, removePreference, setPreference, toString
 
Methods inherited from class org.apache.mahout.cf.taste.impl.model.AbstractDataModel
setMaxPreference, setMinPreference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JesterDataModel

public JesterDataModel()
                throws IOException
Throws:
IOException

JesterDataModel

public JesterDataModel(File ratingsFile)
                throws IOException
Parameters:
ratingsFile - Jester ratings file in CSV format
Throws:
IOException - if an error occurs while reading or writing files
Method Detail

reload

public void reload()
Overrides:
reload in class FileDataModel

buildModel

protected DataModel buildModel()
                        throws IOException
Overrides:
buildModel in class FileDataModel
Throws:
IOException

processLine

protected void processLine(String line,
                           FastByIDMap<?> rawData,
                           FastByIDMap<FastByIDMap<Long>> timestamps,
                           boolean fromPriorData)
Overrides:
processLine in class FileDataModel


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