public class LLORMAUpdater
extends java.lang.Thread
This implementation refers to the method proposed by Lee et al. at ICML 2013.
Lcoal Structure: Joonseok Lee, Local Low-Rank Matrix Approximation , ICML. 2013: 82-90.
Modifier and Type | Field and Description |
---|---|
double |
learnRate
Learning rate parameter.
|
int |
localIteration
The maximum number of iteration.
|
double |
localRegItem
Regularization factor parameter.
|
double |
localRegUser
Regularization factor parameter.
|
Constructor and Description |
---|
LLORMAUpdater(int threadIDParam,
int numFactorsParam,
int numUsersParam,
int numItemsParam,
int anchorUserParam,
int anchorItemParam,
double learnRateParam,
double localRegUserParam,
double localRegItemParam,
int localIterationParam,
DenseVector userWeightsParam,
DenseVector itemWeightsParam,
SparseMatrix trainMatrixParam)
Construct a local model for singleton LLORMA.
|
Modifier and Type | Method and Description |
---|---|
int |
getItemAnchor()
Getter method for anchor item of this local model.
|
DenseMatrix |
getLocalItemFactors()
Getter method for item profile of this local model.
|
DenseMatrix |
getLocalUserFactors()
Getter method for user profile of this local model.
|
int |
getRank()
Getter method for rank of this local model.
|
int |
getThreadId()
Getter method for thread ID.
|
int |
getUserAnchor()
Getter method for anchor user of this local model.
|
protected double |
predict(int userIdx,
int itemIdx) |
void |
run()
Learn this local model based on similar users to the anchor user
and similar items to the anchor item.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public double learnRate
public int localIteration
public double localRegUser
public double localRegItem
public LLORMAUpdater(int threadIDParam, int numFactorsParam, int numUsersParam, int numItemsParam, int anchorUserParam, int anchorItemParam, double learnRateParam, double localRegUserParam, double localRegItemParam, int localIterationParam, DenseVector userWeightsParam, DenseVector itemWeightsParam, SparseMatrix trainMatrixParam)
threadIDParam
- A unique thread ID.numFactorsParam
- The rank which will be used in this local model.numUsersParam
- The number of users.numItemsParam
- The number of items.anchorUserParam
- The anchor user used to learn this local model.anchorItemParam
- The anchor item used to learn this local model.learnRateParam
- Learning rate parameter.userWeightsParam
- Initial vector containing each user's weight.itemWeightsParam
- Initial vector containing each item's weight.trainMatrixParam
- The rating matrix used for learning.localIterationParam
- localIterationParamlocalRegItemParam
- localRegItemParamlocalRegUserParam
- localRegUserParampublic int getThreadId()
public int getRank()
public int getUserAnchor()
public int getItemAnchor()
public DenseMatrix getLocalUserFactors()
public DenseMatrix getLocalItemFactors()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected double predict(int userIdx, int itemIdx)
Copyright © 2017. All Rights Reserved.