Gadget
Public Member Functions | List of all members
OptInfoHooke Class Reference

This is the class used for the Hooke & Jeeves optimisation. More...

#include <optinfo.h>

Inheritance diagram for OptInfoHooke:
Inheritance graph
Collaboration diagram for OptInfoHooke:
Collaboration graph

Public Member Functions

 OptInfoHooke ()
 This is the default OptInfoHooke constructor. More...
 
virtual ~OptInfoHooke ()
 This is the default OptInfoHooke destructor. More...
 
virtual void read (CommentStream &infile, char *text)
 This is the function used to read in the Hooke & Jeeves 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 Hooke & Jeeves optimiser. More...
 
- Public Member Functions inherited from OptInfo
 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

- Protected Attributes inherited from OptInfo
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...
 

Detailed Description

This is the class used for the Hooke & Jeeves optimisation.

The Hooke & Jeeves optimisation is the default optimisation, and is a simple and fast optimising method, but somewhat unreliable, which is often described as a "hill climbing" technique. From the initial starting point the algorithm takes a step in various directions, and conducts a new model run. If the new likelihood score is better than the old one then the algorithm uses the new point as it's best guess. If it is worse then the algorithm retains the old point. The search proceeds in series of these steps, each step slightly smaller than the previous one. When the algorithm finds a point which it cannot improve on with a small step in any direction then it accepts this point as being the "solution", and exits. It is recommended that you re-run the optimisation, using the final point of one run as the start of the next.

The Hooke & Jeeves algorithm used in Gadget is derived from that originally presented by R. Hooke and T. A. Jeeves, ''Direct Search Solution of Numerical and Statistical Problems'' in the April 1961 (Vol. 8, pp. 212-229) issue of the Journal of the ACM, with improvements presented by Arthur F Kaupe Jr., ''Algorithm 178: Direct Search'' in the June 1963 (Vol 6, pp.313-314) issue of the Communications of the ACM.

Constructor & Destructor Documentation

◆ OptInfoHooke()

OptInfoHooke::OptInfoHooke ( )

This is the default OptInfoHooke constructor.

◆ ~OptInfoHooke()

virtual OptInfoHooke::~OptInfoHooke ( )
inlinevirtual

This is the default OptInfoHooke destructor.

Member Function Documentation

◆ OptimiseLikelihood()

void OptInfoHooke::OptimiseLikelihood ( )
virtual

This is the function that will calculate the likelihood score using the Hooke & Jeeves optimiser.

Reimplemented from OptInfo.

◆ Print()

void OptInfoHooke::Print ( ofstream &  outfile,
int  prec 
)
virtual

This function will print information from the optimisation algorithm.

Parameters
outfileis the ofstream that the optimisation information gets sent to
precis the precision to use in the output file

Reimplemented from OptInfo.

◆ read()

void OptInfoHooke::read ( CommentStream infile,
char *  text 
)
virtual

This is the function used to read in the Hooke & Jeeves parameters.

Parameters
infileis the CommentStream to read the optimisation parameters from
textis a text string used to compare parameter names

Reimplemented from OptInfo.


The documentation for this class was generated from the following files: