public class ParallelSGDFactorizer extends AbstractFactorizer
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ParallelSGDFactorizer.PreferenceShuffler |
| Modifier and Type | Field and Description |
|---|---|
protected double[][] |
itemVectors
item features
|
protected double[][] |
userVectors
user features
|
| Constructor and Description |
|---|
ParallelSGDFactorizer(DataModel dataModel,
int numFeatures,
double lambda,
int numEpochs) |
ParallelSGDFactorizer(DataModel dataModel,
int numFeatures,
double lambda,
int numIterations,
double mu0,
double decayFactor,
int stepOffset,
double forgettingExponent) |
ParallelSGDFactorizer(DataModel dataModel,
int numFeatures,
double lambda,
int numIterations,
double mu0,
double decayFactor,
int stepOffset,
double forgettingExponent,
double biasMuRatio,
double biasLambdaRatio) |
ParallelSGDFactorizer(DataModel dataModel,
int numFeatures,
double lambda,
int numIterations,
double mu0,
double decayFactor,
int stepOffset,
double forgettingExponent,
double biasMuRatio,
double biasLambdaRatio,
int numThreads) |
ParallelSGDFactorizer(DataModel dataModel,
int numFeatures,
double lambda,
int numIterations,
double mu0,
double decayFactor,
int stepOffset,
double forgettingExponent,
int numThreads) |
| Modifier and Type | Method and Description |
|---|---|
Factorization |
factorize() |
protected void |
initialize() |
protected void |
update(Preference preference,
double mu)
TODO: this is the vanilla sgd by Tacaks 2009, I speculate that using scaling technique proposed in:
Towards Optimal One Pass Large Scale Learning with Averaged Stochastic Gradient Descent section 5, page 6
can be beneficial in term s of both speed and accuracy.
|
createFactorization, itemIndex, refresh, userIndexprotected volatile double[][] userVectors
protected volatile double[][] itemVectors
public ParallelSGDFactorizer(DataModel dataModel, int numFeatures, double lambda, int numEpochs) throws TasteException
TasteExceptionpublic ParallelSGDFactorizer(DataModel dataModel, int numFeatures, double lambda, int numIterations, double mu0, double decayFactor, int stepOffset, double forgettingExponent) throws TasteException
TasteExceptionpublic ParallelSGDFactorizer(DataModel dataModel, int numFeatures, double lambda, int numIterations, double mu0, double decayFactor, int stepOffset, double forgettingExponent, int numThreads) throws TasteException
TasteExceptionpublic ParallelSGDFactorizer(DataModel dataModel, int numFeatures, double lambda, int numIterations, double mu0, double decayFactor, int stepOffset, double forgettingExponent, double biasMuRatio, double biasLambdaRatio) throws TasteException
TasteExceptionpublic ParallelSGDFactorizer(DataModel dataModel, int numFeatures, double lambda, int numIterations, double mu0, double decayFactor, int stepOffset, double forgettingExponent, double biasMuRatio, double biasLambdaRatio, int numThreads) throws TasteException
TasteExceptionprotected void initialize()
throws TasteException
TasteExceptionpublic Factorization factorize() throws TasteException
TasteExceptionprotected void update(Preference preference, double mu)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.