Direct Graphical Models
v.1.7.0
|
The Powell search method class. More...
#include <Powell.h>
Public Member Functions | |
CPowell (size_t nParams) | |
Constructor. More... | |
CPowell (const CPowell &)=delete | |
~CPowell (void)=default | |
const CPowell & | operator= (const CPowell &)=delete |
void | reset (void) |
Resets class variables. More... | |
void | setInitParams (const vec_float_t &vParams) |
Sets the initial parameters (arguments) for the search algorithm. More... | |
void | setDeltas (const vec_float_t &vDeltas) |
Sets the searching steps along the parameters (arguments) More... | |
void | setMinParams (const vec_float_t &vMinParam) |
Sets the lower boundary for parameters (arguments) search. More... | |
void | setMaxParams (const vec_float_t &vMaxParam) |
Sets the upper boundary for parameters (arguments) search. More... | |
void | setAcceleration (float acceleration) |
Sets the acceleration coefficient. More... | |
vec_float_t | getParams (float val) |
Gets the updated parameters (arguments) More... | |
bool | isConverged (void) const |
Indicates weather the method has converged. More... | |
Private Types | |
enum | { mD, oD, pD } |
coordinates of the Kappa function More... | |
Private Attributes | |
size_t | m_nParams |
size_t | m_paramID |
size_t | m_nSteps |
float | m_midPoint |
float | m_koeff |
float | m_acceleration |
vec_float_t | m_vParams |
vec_float_t | m_vDeltas |
vec_float_t | m_vMin |
vec_float_t | m_vMax |
vec_float_t | m_vKappa |
vec_bool_t | m_vConverged |
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:
|
private |
DirectGraphicalModels::CPowell::CPowell | ( | size_t | nParams | ) |
Constructor.
nParams | Number of parameters (arguments) of the objective function |
Definition at line 7 of file Powell.cpp.
|
delete |
|
default |
vec_float_t 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 87 of file Powell.cpp.
bool DirectGraphicalModels::CPowell::isConverged | ( | void | ) | const |
Indicates weather the method has converged.
true | if the method has converged |
false | otherwise |
Definition at line 176 of file Powell.cpp.
void DirectGraphicalModels::CPowell::reset | ( | void | ) |
Resets class variables.
Definition at line 19 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 81 of file Powell.cpp.
void DirectGraphicalModels::CPowell::setDeltas | ( | const vec_float_t & | vDeltas | ) |
Sets the searching steps along the parameters (arguments)
Default values are 0.1 for all parameters (arguments)
vDeltas | An array with the offset values for each parameter (argument) |
Definition at line 74 of file Powell.cpp.
void DirectGraphicalModels::CPowell::setInitParams | ( | const vec_float_t & | vParams | ) |
Sets the initial parameters (arguments) for the search algorithm.
Default values are 0 for all parameters (arguments)
vParams | An array with the initial values for the search algorithm |
Definition at line 34 of file Powell.cpp.
void DirectGraphicalModels::CPowell::setMaxParams | ( | const vec_float_t & | vMaxParam | ) |
Sets the upper boundary for parameters (arguments) search.
Default values are \(+\infty\) for all parameters (arguments)
vMaxParam | An array with the maximal parameter (argument) values |
Definition at line 63 of file Powell.cpp.
void DirectGraphicalModels::CPowell::setMinParams | ( | const vec_float_t & | vMinParam | ) |
Sets the lower boundary for parameters (arguments) search.
Default values are \(-\infty\) for all parameters (arguments)
vMinParam | An array with the minimal parameter (argument) values |
Definition at line 52 of file Powell.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |