Gadget
|
This is the class used for the BFGS optimisation. More...
#include <optinfo.h>
Public Member Functions | |
OptInfoBFGS () | |
This is the default OptInfoBFGS constructor. More... | |
virtual | ~OptInfoBFGS () |
This is the default OptInfoBFGS destructor. More... | |
virtual void | read (CommentStream &infile, char *text) |
This is the function used to read in the BFGS parameters. More... | |
virtual void | Print (ofstream &outfile, int prec) |
This function will print information from the optimisation algorithm. More... | |
virtual void | OptimiseLikelihood () |
This is the function that will calculate the likelihood score using the BFGS optimiser. More... | |
![]() | |
OptInfo () | |
This is the default OptInfo constructor. More... | |
virtual | ~OptInfo () |
This is the default OptInfo destructor. More... | |
OptType | getType () const |
This will return the type of optimisation class. More... | |
Additional Inherited Members | |
![]() | |
int | converge |
This is the flag used to denote whether the optimisation converged or not. More... | |
int | iters |
This is the number of iterations that took place during the optimisation. More... | |
double | score |
This is the value of the best likelihood score from the optimisation. More... | |
OptType | type |
This denotes what type of optimisation class has been created. More... | |
This is the class used for the BFGS optimisation.
BFGS is a quasi-Newton global optimisation method that uses information about the gradient of the function at the current point to calculate the best direction to look in to find a better point. Using this information, the BFGS algorithm can iteratively calculate a better approximation to the inverse Hessian matrix, which will lead to a better approximation of the minimum value. From an initial starting point, the gradient of the function is calculated and then the algorithm uses this information to calculate the best direction to perform a linesearch for a point that is ''sufficiently better''. The linesearch that is used in Gadget to look for a better point in this direction is the ''Armijo'' linesearch. The algorithm will then adjust the current estimate of the inverse Hessian matrix, and restart from this new point. If a better point cannot be found, then the inverse Hessian matrix is reset and the algorithm restarts from the last accepted point.
The BFGS algorithm used in Gadget is derived from that presented by Dimitri P Bertsekas, ''Nonlinear Programming'' (2nd edition, pp22-61) published by Athena Scientific.
OptInfoBFGS::OptInfoBFGS | ( | ) |
This is the default OptInfoBFGS constructor.
|
inlinevirtual |
This is the default OptInfoBFGS destructor.
|
virtual |
This is the function that will calculate the likelihood score using the BFGS optimiser.
Reimplemented from OptInfo.
|
virtual |
This function will print information from the optimisation algorithm.
outfile | is the ofstream that the optimisation information gets sent to |
prec | is the precision to use in the output file |
Reimplemented from OptInfo.
|
virtual |
This is the function used to read in the BFGS parameters.
infile | is the CommentStream to read the optimisation parameters from |
text | is a text string used to compare parameter names |
Reimplemented from OptInfo.