Package cc.mallet.optimize
Class GradientAscent
- java.lang.Object
-
- cc.mallet.optimize.GradientAscent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cc.mallet.optimize.Optimizer
Optimizer.ByBatches
-
-
Constructor Summary
Constructors Constructor Description GradientAscent(Optimizable.ByGradientValue function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetInitialStepSize()LineOptimizer.ByGradientgetLineMaximizer()OptimizablegetOptimizable()doublegetStpmax()booleanisConverged()booleanoptimize()booleanoptimize(int numIterations)voidsetEvaluator(OptimizerEvaluator.ByGradient eval)voidsetInitialStepSize(double initialStepSize)voidsetMaxStepSize(double v)voidsetStpmax(double stpmax)voidsetTolerance(double tolerance)Sets the tolerance in the convergence test: 2.0*|value-old_value| <= tolerance*(|value|+|old_value|+eps) Default value is 0.001.
-
-
-
Constructor Detail
-
GradientAscent
public GradientAscent(Optimizable.ByGradientValue function)
-
-
Method Detail
-
getOptimizable
public Optimizable getOptimizable()
- Specified by:
getOptimizablein interfaceOptimizer
-
isConverged
public boolean isConverged()
- Specified by:
isConvergedin interfaceOptimizer
-
getLineMaximizer
public LineOptimizer.ByGradient getLineMaximizer()
-
setTolerance
public void setTolerance(double tolerance)
Sets the tolerance in the convergence test: 2.0*|value-old_value| <= tolerance*(|value|+|old_value|+eps) Default value is 0.001.- Parameters:
tolerance- tolerance for convergence test
-
getInitialStepSize
public double getInitialStepSize()
-
setInitialStepSize
public void setInitialStepSize(double initialStepSize)
-
getStpmax
public double getStpmax()
-
setStpmax
public void setStpmax(double stpmax)
-
setMaxStepSize
public void setMaxStepSize(double v)
-
setEvaluator
public void setEvaluator(OptimizerEvaluator.ByGradient eval)
-
-