gov.sandia.cognition.learning.algorithm.minimization

Class FunctionMinimizerFletcherReeves

• All Implemented Interfaces:
AnytimeAlgorithm<InputOutputPair<Vector,java.lang.Double>>, IterativeAlgorithm, StoppableAlgorithm, AnytimeBatchLearner<DifferentiableEvaluator<? super Vector,java.lang.Double,Vector>,InputOutputPair<Vector,java.lang.Double>>, BatchLearner<DifferentiableEvaluator<? super Vector,java.lang.Double,Vector>,InputOutputPair<Vector,java.lang.Double>>, FunctionMinimizer<Vector,java.lang.Double,DifferentiableEvaluator<? super Vector,java.lang.Double,Vector>>, CloneableSerializable, java.io.Serializable, java.lang.Cloneable

```@PublicationReference(author="R. Fletcher",
title="Practical Methods of Optimization, Second Edition",
type=Book,
year=1987,
pages={80,83},
notes="Equation 4.1.4")
public class FunctionMinimizerFletcherReeves
This is an implementation of the Fletcher-Reeves conjugate gradient minimization procedure. This is an unconstrained nonlinear optimization technique that uses first-order derivative (gradient) information to determine the direction of exact line searches. This algorithm is the original variant of conjugate gradient minimization, and is generally regarded as inferior to other variants, such as Polack-Ribiere and Liu-Storey. Furthermore, CG is generally regarded as inferior to quasi-Newton methods such as BFGS, but goes not store an NxN Hessian inverse. Thus, if you have many inputs (N), then the conjugate gradient minimization may be better than BFGS for your problem. But even if you decide to go with CG, then try the other CG variants before Fletcher-Reeves.
Since:
2.1
Author:
Kevin R. Dixon
Serialized Form

• Fields inherited from class gov.sandia.cognition.learning.algorithm.minimization.FunctionMinimizerConjugateGradient

`DEFAULT_LINE_MINIMIZER, DEFAULT_MAX_ITERATIONS, DEFAULT_TOLERANCE, lineFunction`
• Fields inherited from class gov.sandia.cognition.learning.algorithm.minimization.AbstractAnytimeFunctionMinimizer

`initialGuess, result, 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

Constructors
Constructor and Description
`FunctionMinimizerFletcherReeves()`
Creates a new instance of FunctionMinimizerPolakRibiere
`FunctionMinimizerFletcherReeves(LineMinimizer<?> lineMinimizer)`
Creates a new instance of FunctionMinimizerPolakRibiere
```FunctionMinimizerFletcherReeves(LineMinimizer<?> lineMinimizer, Vector initialGuess, double tolerance, int maxIterations)```
Creates a new instance of FunctionMinimizerConjugateGradient
• Method Summary

All Methods
Modifier and Type Method and Description
`protected double` ```computeScaleFactor(Vector gradientCurrent, Vector gradientPrevious)```
Computes the conjugate gradient parameter for the particular update scheme.
• Methods inherited from class gov.sandia.cognition.learning.algorithm.minimization.FunctionMinimizerConjugateGradient

`cleanupAlgorithm, getLineMinimizer, initializeAlgorithm, setLineMinimizer, step`
• Methods inherited from class gov.sandia.cognition.learning.algorithm.minimization.AbstractAnytimeFunctionMinimizer

`getInitialGuess, getResult, getTolerance, setInitialGuess, setResult, 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.minimization.FunctionMinimizer

`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`
• Constructor Detail

• FunctionMinimizerFletcherReeves

`public FunctionMinimizerFletcherReeves()`
Creates a new instance of FunctionMinimizerPolakRibiere
• FunctionMinimizerFletcherReeves

`public FunctionMinimizerFletcherReeves(LineMinimizer<?> lineMinimizer)`
Creates a new instance of FunctionMinimizerPolakRibiere
Parameters:
`lineMinimizer` - Work-horse algorithm that minimizes the function along a direction
• FunctionMinimizerFletcherReeves

```public FunctionMinimizerFletcherReeves(LineMinimizer<?> lineMinimizer,
Vector initialGuess,
double tolerance,
int maxIterations)```
Creates a new instance of FunctionMinimizerConjugateGradient
Parameters:
`initialGuess` - Initial guess about the minimum of the method
`tolerance` - Tolerance of the minimization algorithm, must be >= 0.0, typically ~1e-10
`lineMinimizer` - Work-horse algorithm that minimizes the function along a direction
`maxIterations` - Maximum number of iterations, must be >0, typically ~100
• Method Detail

• computeScaleFactor

```protected double computeScaleFactor(Vector gradientCurrent,
Description copied from class: `FunctionMinimizerConjugateGradient`
`computeScaleFactor` in class `FunctionMinimizerConjugateGradient`
`gradientCurrent` - Gradient at the current evaluation point
`gradientPrevious` - Gradient at the previous evaluation point