@PublicationReference(author="R. Fletcher",title="Practical Methods of Optimization, Second Edition",type=Book,year=1987,pages={49,57},notes="Section 3.2") @PublicationReference(author="Wikipedia",title="Quasi-Newton method",type=WebPage,year=2008,url="http://en.wikipedia.org/wiki/Quasi-Newton_methods") @PublicationReference(author={"William H. Press","Saul A. Teukolsky","William T. Vetterling","Brian P. Flannery"},title="Numerical Recipes in C, Second Edition",type=Book,year=1992,pages={425,430},notes="Section 10.7",url="http://www.nrbook.com/a/bookcpdf.php") public abstract class FunctionMinimizerQuasiNewton extends AbstractAnytimeFunctionMinimizer<Vector,java.lang.Double,DifferentiableEvaluator<? super Vector,java.lang.Double,Vector>>
Modifier and Type | Field and Description |
---|---|
static LineMinimizer<?> |
DEFAULT_LINE_MINIMIZER
Default line minimization algorithm, LineMinimizerDerivativeBased
|
static int |
DEFAULT_MAX_ITERATIONS
Default maximum number of iterations before stopping, 1000
|
static double |
DEFAULT_TOLERANCE
Default tolerance, 1.0E-5
|
initialGuess, result, tolerance
data, keepGoing
maxIterations
DEFAULT_ITERATION, iteration
Constructor and Description |
---|
FunctionMinimizerQuasiNewton(LineMinimizer<?> lineMinimizer,
Vector initialGuess,
double tolerance,
int maxIterations)
Creates a new instance of FunctionMinimizerBFGS
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected abstract boolean |
updateHessianInverse(Matrix hessianInverse,
Vector delta,
Vector gamma)
The step that makes BFGS/DFP/SR1 different from each other.
|
getInitialGuess, getResult, getTolerance, setInitialGuess, setResult, setTolerance
clone, getData, getKeepGoing, learn, setData, setKeepGoing, stop
getMaxIterations, isResultValid, setMaxIterations
addIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListeners
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
learn
clone
getMaxIterations, setMaxIterations
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener
isResultValid, stop
public static final int DEFAULT_MAX_ITERATIONS
public static final double DEFAULT_TOLERANCE
public static final LineMinimizer<?> DEFAULT_LINE_MINIMIZER
public FunctionMinimizerQuasiNewton(LineMinimizer<?> lineMinimizer, Vector initialGuess, double tolerance, int maxIterations)
initialGuess
- Initial guess about the minimum of the methodtolerance
- Tolerance of the minimization algorithm, must be >= 0.0, typically ~1e-10lineMinimizer
- Work-horse algorithm that minimizes the function along a directionmaxIterations
- Maximum number of iterations, must be >0, typically ~100protected boolean initializeAlgorithm()
AbstractAnytimeBatchLearner
initializeAlgorithm
in class AbstractAnytimeBatchLearner<DifferentiableEvaluator<? super Vector,java.lang.Double,Vector>,InputOutputPair<Vector,java.lang.Double>>
protected boolean step()
AbstractAnytimeBatchLearner
step
in class AbstractAnytimeBatchLearner<DifferentiableEvaluator<? super Vector,java.lang.Double,Vector>,InputOutputPair<Vector,java.lang.Double>>
protected abstract boolean updateHessianInverse(Matrix hessianInverse, Vector delta, Vector gamma)
hessianInverse
- Current estimate of the Hessian inverse. Must be modified!delta
- Change in the search points (xnew-xold)gamma
- Change in the gradients (gnew-gold)protected void cleanupAlgorithm()
AbstractAnytimeBatchLearner
cleanupAlgorithm
in class AbstractAnytimeBatchLearner<DifferentiableEvaluator<? super Vector,java.lang.Double,Vector>,InputOutputPair<Vector,java.lang.Double>>
public LineMinimizer<?> getLineMinimizer()
public void setLineMinimizer(LineMinimizer<?> lineMinimizer)
lineMinimizer
- Work-horse algorithm that minimizes the function along a direction