public class GradientDescentL1 extends GradientDescent
The regularization function is ||w||_1
with w
being the weight vector.
IterativeSolver.ConvergenceThreshold$, IterativeSolver.Iterations$, IterativeSolver.LearningRate$, IterativeSolver.LearningRateMethodValue$
Solver.LossFunction$, Solver.RegularizationConstant$
Constructor and Description |
---|
GradientDescentL1() |
Modifier and Type | Method and Description |
---|---|
static GradientDescentL1 |
apply() |
Vector |
takeStep(Vector weightVector,
Vector gradient,
double regularizationConstant,
double learningRate)
Calculates the new weights based on the gradient.
|
optimize, optimizeWithConvergenceCriterion, optimizeWithoutConvergenceCriterion
MAX_DLOSS, setConvergenceThreshold, setIterations, setLearningRateMethod, setStepsize
createInitialWeightsDS, createInitialWeightVector, setLossFunction, setRegularizationConstant
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parameters
public static GradientDescentL1 apply()
public Vector takeStep(Vector weightVector, Vector gradient, double regularizationConstant, double learningRate)
takeStep
in class GradientDescent
weightVector
- gradient
- regularizationConstant
- learningRate
- Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.