Direct Graphical Models
v.1.5.1
|
The Powell search method class. More...
#include <Powell.h>
Public Member Functions | |
CPowell (word nParams) | |
Constructor. More... | |
~CPowell (void) | |
void | reset (void) |
Resets class variables. More... | |
void | setInitParams (float *pParam) |
Sets the initial parameters (arguments) for the search algorithm. More... | |
void | setDeltas (float *pDelta) |
Sets the searching steps along the parameters (arguments) More... | |
void | setMinParams (float *pMinParam) |
Sets the lower boundary for parameters (arguments) search. More... | |
void | setMaxParams (float *pMaxParam) |
Sets the upper boundary for parameters (arguments) search. More... | |
void | setAcceleration (float acceleration) |
Sets the acceleration coefficient. More... | |
float * | getParams (float val) |
Gets the updated parameters (arguments) More... | |
bool | isConverged (void) |
Indicates weather the method has converged. More... | |
The Powell search method class.
The Powell search method is an iterative optimisation algortihm that does not require an estimate for the gradient of the objective function: \( f:\mathbb{R}^n\rightarrow\mathbb{R} \), where \( n \) is the number of parameters (arguments). In order to find the extremum point, one may use the common case:
DirectGraphicalModels::CPowell::CPowell | ( | word | nParams | ) |
Constructor.
nParams | Number of parameters (arguments) of the objective function |
Definition at line 7 of file Powell.cpp.
DirectGraphicalModels::CPowell::~CPowell | ( | void | ) |
Definition at line 19 of file Powell.cpp.
float * DirectGraphicalModels::CPowell::getParams | ( | float | val | ) |
Gets the updated parameters (arguments)
This function updates the parameters (arguments) of the objective function based on its outcome value val and retunrs them (See example code for more details)
val | The current value of the objective function |
Definition at line 78 of file Powell.cpp.
bool DirectGraphicalModels::CPowell::isConverged | ( | void | ) |
Indicates weather the method has converged.
true | if the method has converged |
false | otherwise |
Definition at line 168 of file Powell.cpp.
void DirectGraphicalModels::CPowell::reset | ( | void | ) |
Resets class variables.
Definition at line 23 of file Powell.cpp.
void DirectGraphicalModels::CPowell::setAcceleration | ( | float | acceleration | ) |
Sets the acceleration coefficient.
Incrasing this parameter may speed-up the convergence of the method, however too large values may affect the calculation stability
Default value is 0.1
acceleration | The acceleration coefficient |
Definition at line 72 of file Powell.cpp.
void DirectGraphicalModels::CPowell::setDeltas | ( | float * | pDelta | ) |
Sets the searching steps along the parameters (arguments)
Default values are 0.1 for all parameters (arguments)
pDelta | Pointer to an array with the offset values for each parameter (argument) |
Definition at line 67 of file Powell.cpp.
void DirectGraphicalModels::CPowell::setInitParams | ( | float * | pParam | ) |
Sets the initial parameters (arguments) for the search algorithm.
Default values are 0 for all parameters (arguments)
pParam | Pointer to an array with the initial values for the search algorithm |
Definition at line 38 of file Powell.cpp.
void DirectGraphicalModels::CPowell::setMaxParams | ( | float * | pMaxParam | ) |
Sets the upper boundary for parameters (arguments) search.
Default values are \(+\infty\) for all parameters (arguments)
pMaxParam | Pointer to an array with the maximal parameter (argument) values |
Definition at line 60 of file Powell.cpp.
void DirectGraphicalModels::CPowell::setMinParams | ( | float * | pMinParam | ) |
Sets the lower boundary for parameters (arguments) search.
Default values are \(-\infty\) for all parameters (arguments)
pMinParam | Pointer to an array with the minimal parameter (argument) values |
Definition at line 53 of file Powell.cpp.