org.apache.mahout.cf.taste.impl.recommender.svd
Class ALSWRFactorizer

java.lang.Object
  extended by org.apache.mahout.cf.taste.impl.recommender.svd.AbstractFactorizer
      extended by org.apache.mahout.cf.taste.impl.recommender.svd.ALSWRFactorizer
All Implemented Interfaces:
Refreshable, Factorizer

public class ALSWRFactorizer
extends AbstractFactorizer

factorizes the rating matrix using "Alternating-Least-Squares with Weighted-λ-Regularization" as described in "Large-scale Collaborative Filtering for the Netflix Prize" also supports the implicit feedback variant of this approach as described in "Collaborative Filtering for Implicit Feedback Datasets" available at http://research.yahoo.com/pub/2433


Constructor Summary
ALSWRFactorizer(DataModel dataModel, int numFeatures, double lambda, int numIterations)
           
ALSWRFactorizer(DataModel dataModel, int numFeatures, double lambda, int numIterations, boolean usesImplicitFeedback, double alpha)
           
ALSWRFactorizer(DataModel dataModel, int numFeatures, double lambda, int numIterations, boolean usesImplicitFeedback, double alpha, int numTrainingThreads)
           
 
Method Summary
protected  ExecutorService createQueue()
           
 Factorization factorize()
           
protected  OpenIntObjectHashMap<Vector> itemFeaturesMapping(LongPrimitiveIterator itemIDs, int numItems, double[][] featureMatrix)
           
protected static Vector ratingVector(PreferenceArray prefs)
           
protected  Vector sparseItemRatingVector(PreferenceArray prefs)
           
protected  Vector sparseUserRatingVector(PreferenceArray prefs)
           
protected  OpenIntObjectHashMap<Vector> userFeaturesMapping(LongPrimitiveIterator userIDs, int numUsers, double[][] featureMatrix)
           
 
Methods inherited from class org.apache.mahout.cf.taste.impl.recommender.svd.AbstractFactorizer
createFactorization, itemIndex, refresh, userIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ALSWRFactorizer

public ALSWRFactorizer(DataModel dataModel,
                       int numFeatures,
                       double lambda,
                       int numIterations,
                       boolean usesImplicitFeedback,
                       double alpha,
                       int numTrainingThreads)
                throws TasteException
Throws:
TasteException

ALSWRFactorizer

public ALSWRFactorizer(DataModel dataModel,
                       int numFeatures,
                       double lambda,
                       int numIterations,
                       boolean usesImplicitFeedback,
                       double alpha)
                throws TasteException
Throws:
TasteException

ALSWRFactorizer

public ALSWRFactorizer(DataModel dataModel,
                       int numFeatures,
                       double lambda,
                       int numIterations)
                throws TasteException
Throws:
TasteException
Method Detail

factorize

public Factorization factorize()
                        throws TasteException
Throws:
TasteException

createQueue

protected ExecutorService createQueue()

ratingVector

protected static Vector ratingVector(PreferenceArray prefs)

itemFeaturesMapping

protected OpenIntObjectHashMap<Vector> itemFeaturesMapping(LongPrimitiveIterator itemIDs,
                                                           int numItems,
                                                           double[][] featureMatrix)

userFeaturesMapping

protected OpenIntObjectHashMap<Vector> userFeaturesMapping(LongPrimitiveIterator userIDs,
                                                           int numUsers,
                                                           double[][] featureMatrix)

sparseItemRatingVector

protected Vector sparseItemRatingVector(PreferenceArray prefs)

sparseUserRatingVector

protected Vector sparseUserRatingVector(PreferenceArray prefs)


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