O
- Type of an object of recommendation.S
- Type of a subject of recommendation.public class MatrixFactorizationGradient<O extends Serializable,S extends Serializable> extends Object implements Serializable
Constructor and Description |
---|
MatrixFactorizationGradient(Map<O,Vector> objGrad,
Map<S,Vector> subjGrad,
int rows)
Constructs a new instance of matrix factorization gradient.
|
Modifier and Type | Method and Description |
---|---|
void |
applyGradient(Map<O,Vector> objMatrix,
Map<S,Vector> subjMatrix)
Applies given gradient to recommendation model (object matrix and subject matrix) and updates this model
correspondingly.
|
Map<O,Vector> |
getObjGrad()
Returns gradient of object of recommendation matrix (unmodifiable).
|
int |
getRows()
Returns number of rows the gradient calculated on.
|
Map<S,Vector> |
getSubjGrad()
Returns gradient of subject of recommendation function (unmodifiable).
|
public MatrixFactorizationGradient(Map<O,Vector> objGrad, Map<S,Vector> subjGrad, int rows)
objGrad
- Gradient of object of recommendation matrix.subjGrad
- Gradient of subject of recommendation matrix.rows
- Number of rows the gradient calculated on.public void applyGradient(Map<O,Vector> objMatrix, Map<S,Vector> subjMatrix)
objMatrix
- Object of recommendation matrix.subjMatrix
- Subject of recommendation matrix.public Map<O,Vector> getObjGrad()
public Map<S,Vector> getSubjGrad()
public int getRows()
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024