cc.mallet.optimize
Class GradientAscent

java.lang.Object
  extended by cc.mallet.optimize.GradientAscent
All Implemented Interfaces:
Optimizer

public class GradientAscent
extends java.lang.Object
implements Optimizer


Nested Class Summary
 
Nested classes/interfaces inherited from interface cc.mallet.optimize.Optimizer
Optimizer.ByBatches
 
Constructor Summary
GradientAscent(Optimizable.ByGradientValue function)
           
 
Method Summary
 double getInitialStepSize()
           
 LineOptimizer.ByGradient getLineMaximizer()
           
 Optimizable getOptimizable()
           
 double getStpmax()
           
 boolean isConverged()
           
 boolean optimize()
           
 boolean optimize(int numIterations)
           
 void setEvaluator(OptimizerEvaluator.ByGradient eval)
           
 void setInitialStepSize(double initialStepSize)
           
 void setMaxStepSize(double v)
           
 void setStpmax(double stpmax)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GradientAscent

public GradientAscent(Optimizable.ByGradientValue function)
Method Detail

getOptimizable

public Optimizable getOptimizable()
Specified by:
getOptimizable in interface Optimizer

isConverged

public boolean isConverged()
Specified by:
isConverged in interface Optimizer

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)

optimize

public boolean optimize()
Specified by:
optimize in interface Optimizer

optimize

public boolean optimize(int numIterations)
Specified by:
optimize in interface Optimizer

setMaxStepSize

public void setMaxStepSize(double v)

setEvaluator

public void setEvaluator(OptimizerEvaluator.ByGradient eval)