|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mahout.cf.taste.impl.recommender.svd.AbstractFactorizer
org.apache.mahout.cf.taste.impl.recommender.svd.RatingSGDFactorizer
public class RatingSGDFactorizer
Matrix factorization with user and item biases for rating prediction, trained with plain vanilla SGD
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
RatingSGDFactorizer(DataModel dataModel,
int numFeatures,
double learningRate,
double preventOverfitting,
double randomNoise,
int numIterations,
double learningRateDecay)
|
|
RatingSGDFactorizer(DataModel dataModel,
int numFeatures,
int numIterations)
|
|
| Method Summary | |
|---|---|
Factorization |
factorize()
|
protected void |
prepareTraining()
|
protected void |
shufflePreferences()
|
protected void |
updateParameters(long userID,
long itemID,
float rating,
double currentLearningRate)
|
| 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 |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
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| Method Detail |
|---|
protected void prepareTraining()
throws TasteException
TasteExceptionprotected void shufflePreferences()
public Factorization factorize()
throws TasteException
TasteException
protected void updateParameters(long userID,
long itemID,
float rating,
double currentLearningRate)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||