public class NoRegularization extends Object
Constructor and Description |
---|
NoRegularization() |
Modifier and Type | Method and Description |
---|---|
static double |
regLoss(double oldLoss,
Vector weightVector,
double regularizationParameter)
Returns the unmodified loss value
|
static Vector |
takeStep(Vector weightVector,
Vector gradient,
double regularizationConstant,
double learningRate)
Calculates the new weights based on the gradient
|
public static Vector takeStep(Vector weightVector, Vector gradient, double regularizationConstant, double learningRate)
The updated weight is w - learningRate *gradient
where w
is the weight vector
weightVector
- The weights to be updatedgradient
- The gradient according to which we will update the weightsregularizationConstant
- The regularization parameter which is ignoredlearningRate
- The effective step size for this iterationpublic static double regLoss(double oldLoss, Vector weightVector, double regularizationParameter)
The updated loss is oldLoss
oldLoss
- The loss to be updatedweightVector
- The weights used to update the lossregularizationParameter
- The regularization parameter which is ignoredCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.