gov.sandia.cognition.learning.algorithm.regression
Class GaussNewtonAlgorithm

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm
          extended by gov.sandia.cognition.algorithm.AbstractAnytimeAlgorithm<ResultType>
              extended by gov.sandia.cognition.learning.algorithm.AbstractAnytimeBatchLearner<Collection<? extends InputOutputPair<? extends InputType,OutputType>>,ResultType>
                  extended by gov.sandia.cognition.learning.algorithm.AbstractAnytimeSupervisedBatchLearner<Vector,Vector,ResultType>
                      extended by gov.sandia.cognition.learning.algorithm.regression.AbstractParameterCostMinimizer<GradientDescendable,SumSquaredErrorCostFunction>
                          extended by gov.sandia.cognition.learning.algorithm.regression.LeastSquaresEstimator
                              extended by gov.sandia.cognition.learning.algorithm.regression.GaussNewtonAlgorithm
All Implemented Interfaces:
AnytimeAlgorithm<GradientDescendable>, IterativeAlgorithm, MeasurablePerformanceAlgorithm, StoppableAlgorithm, AnytimeBatchLearner<Collection<? extends InputOutputPair<? extends Vector,Vector>>,GradientDescendable>, BatchCostMinimizationLearner<Collection<? extends InputOutputPair<? extends Vector,Vector>>,GradientDescendable>, BatchLearner<Collection<? extends InputOutputPair<? extends Vector,Vector>>,GradientDescendable>, ParameterCostMinimizer<GradientDescendable>, SupervisedBatchLearner<Vector,Vector,GradientDescendable>, CloneableSerializable, Serializable, Cloneable

@PublicationReference(author="Wikipedia",
                      title="Gauss-Newton algorithm",
                      type=WebPage,
                      year=2009,
                      url="http://en.wikipedia.org/wiki/Gauss%E2%80%93Newton_algorithm")
public class GaussNewtonAlgorithm
extends LeastSquaresEstimator

Implementation of the Gauss-Newton parameter-estimation procedure. Please do not use this method, as it is extremely unstable, and really only for demonstration purposes only.

Instead, use the Fletcher-Xu hybrid method.

Since:
2.1
Author:
Kevin R. Dixon
See Also:
FletcherXuHybridEstimation, Serialized Form

Field Summary
static LineMinimizer<?> DEFAULT_LINE_MINIMIZER
          Default line minimizer, LineMinimizerDerivativeBased.
static double STEP_MAX
          Maximum step norm allowed under a Gauss-Newton step, 100.0
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.regression.AbstractParameterCostMinimizer
DEFAULT_MAX_ITERATIONS, DEFAULT_TOLERANCE
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.AbstractAnytimeBatchLearner
data, keepGoing
 
Fields inherited from class gov.sandia.cognition.algorithm.AbstractAnytimeAlgorithm
maxIterations
 
Fields inherited from class gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm
DEFAULT_ITERATION, iteration
 
Constructor Summary
GaussNewtonAlgorithm()
          Creates a new instance of GaussNewtonAlgorithm
GaussNewtonAlgorithm(LineMinimizer<?> lineMinimizer)
          Creates a new instance of GaussNewtonAlgorithm
GaussNewtonAlgorithm(LineMinimizer<?> lineMinimizer, int maxIterations, double tolerance)
          Creates a new instance of GaussNewtonAlgorithm
 
Method Summary
protected  void cleanupAlgorithm()
          Called to clean up the learning algorithm's state after learning has finished.
 LineMinimizer<?> getLineMinimizer()
          Getter for lineMinimizer
protected  boolean initializeAlgorithm()
          Called to initialize the learning algorithm's state based on the data that is stored in the data field.
 void setLineMinimizer(LineMinimizer<?> lineMinimizer)
          Setter for lineMinimizer
protected  boolean step()
          Called to take a single step of the learning algorithm.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.regression.AbstractParameterCostMinimizer
getCostFunction, getObjectToOptimize, getPerformance, getResult, getResultCost, getTolerance, setCostFunction, setObjectToOptimize, setResult, setResultCost, setTolerance
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractAnytimeBatchLearner
clone, getData, getKeepGoing, learn, setData, setKeepGoing, stop
 
Methods inherited from class gov.sandia.cognition.algorithm.AbstractAnytimeAlgorithm
getMaxIterations, isResultValid, setMaxIterations
 
Methods inherited from class gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm
addIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListeners
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.BatchCostMinimizationLearner
learn
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 
Methods inherited from interface gov.sandia.cognition.algorithm.AnytimeAlgorithm
getMaxIterations, setMaxIterations
 
Methods inherited from interface gov.sandia.cognition.algorithm.IterativeAlgorithm
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener
 
Methods inherited from interface gov.sandia.cognition.algorithm.StoppableAlgorithm
isResultValid, stop
 

Field Detail

DEFAULT_LINE_MINIMIZER

public static final LineMinimizer<?> DEFAULT_LINE_MINIMIZER
Default line minimizer, LineMinimizerDerivativeBased.


STEP_MAX

public static final double STEP_MAX
Maximum step norm allowed under a Gauss-Newton step, 100.0

See Also:
Constant Field Values
Constructor Detail

GaussNewtonAlgorithm

public GaussNewtonAlgorithm()
Creates a new instance of GaussNewtonAlgorithm


GaussNewtonAlgorithm

public GaussNewtonAlgorithm(LineMinimizer<?> lineMinimizer)
Creates a new instance of GaussNewtonAlgorithm

Parameters:
lineMinimizer - Workhorse algorithm that finds the minimum along a particular direction

GaussNewtonAlgorithm

public GaussNewtonAlgorithm(LineMinimizer<?> lineMinimizer,
                            int maxIterations,
                            double tolerance)
Creates a new instance of GaussNewtonAlgorithm

Parameters:
lineMinimizer - Workhorse algorithm that finds the minimum along a particular direction
maxIterations - Maximum number of iterations
tolerance - Tolerance before stopping.
Method Detail

initializeAlgorithm

protected boolean initializeAlgorithm()
Description copied from class: AbstractAnytimeBatchLearner
Called to initialize the learning algorithm's state based on the data that is stored in the data field. The return value indicates if the algorithm can be run or not based on the initialization.

Specified by:
initializeAlgorithm in class AbstractAnytimeBatchLearner<Collection<? extends InputOutputPair<? extends Vector,Vector>>,GradientDescendable>
Returns:
True if the learning algorithm can be run and false if it cannot.

step

protected boolean step()
Description copied from class: AbstractAnytimeBatchLearner
Called to take a single step of the learning algorithm.

Specified by:
step in class AbstractAnytimeBatchLearner<Collection<? extends InputOutputPair<? extends Vector,Vector>>,GradientDescendable>
Returns:
True if another step can be taken and false it the algorithm should halt.

cleanupAlgorithm

protected void cleanupAlgorithm()
Description copied from class: AbstractAnytimeBatchLearner
Called to clean up the learning algorithm's state after learning has finished.

Specified by:
cleanupAlgorithm in class AbstractAnytimeBatchLearner<Collection<? extends InputOutputPair<? extends Vector,Vector>>,GradientDescendable>

getLineMinimizer

public LineMinimizer<?> getLineMinimizer()
Getter for lineMinimizer

Returns:
Workhorse algorithm that finds the minimum along a particular direction

setLineMinimizer

public void setLineMinimizer(LineMinimizer<?> lineMinimizer)
Setter for lineMinimizer

Parameters:
lineMinimizer - Workhorse algorithm that finds the minimum along a particular direction