public abstract class Updater extends Object implements scala.Serializable
For general minimization problems, or for regularized problems of the form min L(w) + regParam * R(w), the compute function performs the actual update step, when given some (e.g. stochastic) gradient direction for the loss L(w), and a desired step-size (learning rate).
The updater is responsible to also perform the update coming from the regularization term R(w) (if any regularization is used).
|Constructor and Description|
|Modifier and Type||Method and Description|
Compute an updated value for weights given the gradient, stepSize, iteration number and regularization parameter.
public abstract scala.Tuple2<Vector,Object> compute(Vector weightsOld, Vector gradient, double stepSize, int iter, double regParam)
weightsOld- - Column matrix of size dx1 where d is the number of features.
gradient- - Column matrix of size dx1 where d is the number of features.
stepSize- - step size across iterations
iter- - Iteration number
regParam- - Regularization parameter