public class RatingSGDFactorizer extends AbstractFactorizer
Modifier and Type | Field and Description |
---|---|
protected double |
biasLearningRate |
protected double |
biasReg |
protected DataModel |
dataModel |
protected static int |
FEATURE_OFFSET |
protected static int |
ITEM_BIAS_INDEX
place in item vector where the bias is stored
|
protected double[][] |
itemVectors
Item features
|
protected double |
learningRate
Learning rate (step size)
|
protected double |
learningRateDecay
Multiplicative decay factor for learning_rate
|
protected int |
numFeatures
Number of features used to compute this factorization
|
protected double |
preventOverfitting
Parameter used to prevent overfitting.
|
protected double |
randomNoise
Standard deviation for random initialization of features
|
protected static int |
USER_BIAS_INDEX
place in user vector where the bias is stored
|
protected double[][] |
userVectors
User features
|
Constructor and Description |
---|
RatingSGDFactorizer(DataModel dataModel,
int numFeatures,
double learningRate,
double preventOverfitting,
double randomNoise,
int numIterations,
double learningRateDecay) |
RatingSGDFactorizer(DataModel dataModel,
int numFeatures,
int numIterations) |
Modifier and Type | Method and Description |
---|---|
Factorization |
factorize() |
protected void |
prepareTraining() |
protected void |
shufflePreferences() |
protected void |
updateParameters(long userID,
long itemID,
float rating,
double currentLearningRate) |
createFactorization, itemIndex, refresh, userIndex
protected static final int FEATURE_OFFSET
protected final double learningRateDecay
protected final double learningRate
protected final double preventOverfitting
protected final int numFeatures
protected final double randomNoise
protected double[][] userVectors
protected double[][] itemVectors
protected final DataModel dataModel
protected double biasLearningRate
protected double biasReg
protected static final int USER_BIAS_INDEX
protected static final int ITEM_BIAS_INDEX
public RatingSGDFactorizer(DataModel dataModel, int numFeatures, int numIterations) throws TasteException
TasteException
public RatingSGDFactorizer(DataModel dataModel, int numFeatures, double learningRate, double preventOverfitting, double randomNoise, int numIterations, double learningRateDecay) throws TasteException
TasteException
protected void prepareTraining() throws TasteException
TasteException
protected void shufflePreferences()
public Factorization factorize() throws TasteException
TasteException
protected void updateParameters(long userID, long itemID, float rating, double currentLearningRate)
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.