Nelder-Meade downhill simplex. More...
#include <vnl_amoeba.h>

Public Member Functions | |
| void | set_max_iterations (int n) |
| Define maximum number of iterations to use. More... | |
| void | set_x_tolerance (double tol) |
| Define tolerance on elements of x. More... | |
| void | set_f_tolerance (double tol) |
| Define tolerance on function evaluation. More... | |
| void | set_relative_diameter (double r) |
| Define scaling used to select starting vertices relative to initial x0. More... | |
| void | set_zero_term_delta (double d) |
| vnl_amoeba (vnl_cost_function &f) | |
| Construct and supply function to be minimized. More... | |
| void | minimize (vnl_vector< double > &x) |
| Modify x to minimise function supplied in constructor. More... | |
| void | minimize (vnl_vector< double > &x, const vnl_vector< double > &dx) |
| Perform optimisation. More... | |
| double | get_end_error () const |
| int | get_num_evaluations () const |
| Number of evaluations used in last call to minimize. More... | |
Static Public Member Functions | |
| static void | minimize (vnl_cost_function &f, vnl_vector< double > &x) |
| Modify x so as to minimise f(x). More... | |
| static void | minimize (vnl_cost_function &f, vnl_vector< double > &x, const vnl_vector< double > &dx) |
| Modify x so as to minimise f(x). More... | |
| static void | minimize (vnl_cost_function &f, vnl_vector< double > &x, double delta) |
| Modify x so as to minimise f(x). More... | |
| static void | minimize (vnl_least_squares_function &f, vnl_vector< double > &x) |
| Modify x so as to minimise f(x). More... | |
Public Attributes | |
| int | verbose |
| int | maxiter |
| double | X_tolerance |
| double | F_tolerance |
| double | relative_diameter |
| Scaling used to select starting vertices relative to initial x0. More... | |
| double | zero_term_delta |
Static Public Attributes | |
| static bool | default_verbose = false |
Protected Attributes | |
| vnl_cost_function * | fptr |
| double | end_error_ |
| int | num_evaluations_ |
Nelder-Meade downhill simplex.
vnl_amoeba is an implementation of the Nelder-Meade downhill simplex algorithm. For most problems, it's a few times slower than vnl_levenberg_marquardt, but it can perform much better on noisy error functions.
It works by creating a simplex (n+1 points in n-D space) which then crawls about the space searching for the solution.
By default the set of (n+1) starting points are generated by applying a scaling (relative_diameter) to each element of the supplied starting vector, with a small offset used instead if the value is zero.
Alternatively, if one uses minimize(x,dx), then the starting points are obtained by adding each dx[i] to the elements of x, one at a time. This is useful if you know roughly the scale of your space.
Definition at line 43 of file vnl_amoeba.h.
| vnl_amoeba::vnl_amoeba | ( | vnl_cost_function & | f | ) |
Construct and supply function to be minimized.
Definition at line 19 of file vnl_amoeba.cxx.
|
inline |
Definition at line 80 of file vnl_amoeba.h.
|
inline |
Number of evaluations used in last call to minimize.
Definition at line 83 of file vnl_amoeba.h.
| void vnl_amoeba::minimize | ( | vnl_vector< double > & | x | ) |
Modify x to minimise function supplied in constructor.
Start simplex defined by scaling elements of x
Definition at line 347 of file vnl_amoeba.cxx.
| void vnl_amoeba::minimize | ( | vnl_vector< double > & | x, |
| const vnl_vector< double > & | dx | ||
| ) |
Perform optimisation.
Perform optimisation. Start simplex defined by adding dx[i] to each x[i].
Start simplex defined by adding dx[i] to each x[i]
Definition at line 356 of file vnl_amoeba.cxx.
|
static |
|
static |
Modify x so as to minimise f(x).
Static method.
Start simplex defined by adding dx[i] to each x[i]
Definition at line 383 of file vnl_amoeba.cxx.
|
static |
Modify x so as to minimise f(x).
Static method.
delta defines relative size of initial simplex ie the i'th vertex has xi[i] = x[i]*(1+delta)
Definition at line 372 of file vnl_amoeba.cxx.
|
static |
Modify x so as to minimise f(x).
Definition at line 410 of file vnl_amoeba.cxx.
|
inline |
Define tolerance on function evaluation.
Definition at line 58 of file vnl_amoeba.h.
|
inline |
Define maximum number of iterations to use.
Definition at line 52 of file vnl_amoeba.h.
|
inline |
Define scaling used to select starting vertices relative to initial x0.
I.e. the i'th vertex has x[i] = x0[i]*(1+relative_diameter)
Definition at line 62 of file vnl_amoeba.h.
|
inline |
Define tolerance on elements of x.
Definition at line 55 of file vnl_amoeba.h.
|
inline |
Definition at line 64 of file vnl_amoeba.h.
|
static |
Definition at line 103 of file vnl_amoeba.h.
|
protected |
Definition at line 107 of file vnl_amoeba.h.
| double vnl_amoeba::F_tolerance |
Definition at line 49 of file vnl_amoeba.h.
|
protected |
Definition at line 106 of file vnl_amoeba.h.
| int vnl_amoeba::maxiter |
Definition at line 47 of file vnl_amoeba.h.
|
protected |
Definition at line 108 of file vnl_amoeba.h.
| double vnl_amoeba::relative_diameter |
Scaling used to select starting vertices relative to initial x0.
I.e. the i'th vertex has x[i] = x0[i]*(1+relative_diameter)
Definition at line 67 of file vnl_amoeba.h.
| int vnl_amoeba::verbose |
Definition at line 46 of file vnl_amoeba.h.
| double vnl_amoeba::X_tolerance |
Definition at line 48 of file vnl_amoeba.h.
| double vnl_amoeba::zero_term_delta |
Definition at line 68 of file vnl_amoeba.h.
1.8.15