public class ALSWRFactorizer extends AbstractFactorizer
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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) |
createFactorization, itemIndex, refresh, userIndex
public ALSWRFactorizer(DataModel dataModel, int numFeatures, double lambda, int numIterations, boolean usesImplicitFeedback, double alpha, int numTrainingThreads) throws TasteException
TasteException
public ALSWRFactorizer(DataModel dataModel, int numFeatures, double lambda, int numIterations, boolean usesImplicitFeedback, double alpha) throws TasteException
TasteException
public ALSWRFactorizer(DataModel dataModel, int numFeatures, double lambda, int numIterations) throws TasteException
TasteException
public Factorization factorize() throws TasteException
TasteException
protected ExecutorService createQueue()
protected static Vector ratingVector(PreferenceArray prefs)
protected OpenIntObjectHashMap<Vector> itemFeaturesMapping(LongPrimitiveIterator itemIDs, int numItems, double[][] featureMatrix)
protected OpenIntObjectHashMap<Vector> userFeaturesMapping(LongPrimitiveIterator userIDs, int numUsers, double[][] featureMatrix)
protected Vector sparseItemRatingVector(PreferenceArray prefs)
protected Vector sparseUserRatingVector(PreferenceArray prefs)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.