org.apache.mahout.cf.taste.impl.recommender.svd
Class ALSWRFactorizer
java.lang.Object
org.apache.mahout.cf.taste.impl.recommender.svd.AbstractFactorizer
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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.