U
- type of the usersI
- type of the itemspublic class HKVFactorizer<U,I> extends ALSFactorizer<U,I>
Constructor and Description |
---|
HKVFactorizer(double lambdaP,
double lambdaQ,
DoubleUnaryOperator confidence,
int numIter)
Constructor.
|
HKVFactorizer(double lambda,
DoubleUnaryOperator confidence,
int numIter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
error(cern.colt.matrix.impl.DenseDoubleMatrix2D p,
cern.colt.matrix.impl.DenseDoubleMatrix2D q,
FastPreferenceData<U,I> data)
Squared loss of two matrices.
|
void |
set_minP(cern.colt.matrix.impl.DenseDoubleMatrix2D p,
cern.colt.matrix.impl.DenseDoubleMatrix2D q,
FastPreferenceData<U,I> data)
User matrix least-squares step.
|
void |
set_minQ(cern.colt.matrix.impl.DenseDoubleMatrix2D q,
cern.colt.matrix.impl.DenseDoubleMatrix2D p,
FastPreferenceData<U,I> data)
Item matrix least-squares step.
|
error, factorize, factorize
public HKVFactorizer(double lambda, DoubleUnaryOperator confidence, int numIter)
lambda
- regularization factorconfidence
- confidence functionnumIter
- number of iterationspublic HKVFactorizer(double lambdaP, double lambdaQ, DoubleUnaryOperator confidence, int numIter)
lambdaP
- regularization factor for user matrixlambdaQ
- regularization factor for item matrixconfidence
- confidence functionnumIter
- number of iterationspublic double error(cern.colt.matrix.impl.DenseDoubleMatrix2D p, cern.colt.matrix.impl.DenseDoubleMatrix2D q, FastPreferenceData<U,I> data)
ALSFactorizer
error
in class ALSFactorizer<U,I>
p
- user matrixq
- item matrixdata
- preference datapublic void set_minP(cern.colt.matrix.impl.DenseDoubleMatrix2D p, cern.colt.matrix.impl.DenseDoubleMatrix2D q, FastPreferenceData<U,I> data)
ALSFactorizer
set_minP
in class ALSFactorizer<U,I>
p
- user matrixq
- item matrixdata
- preference datapublic void set_minQ(cern.colt.matrix.impl.DenseDoubleMatrix2D q, cern.colt.matrix.impl.DenseDoubleMatrix2D p, FastPreferenceData<U,I> data)
ALSFactorizer
set_minQ
in class ALSFactorizer<U,I>
q
- item matrixp
- user matrixdata
- preference dataCopyright © 2016. All rights reserved.