Compass Search. More...
#include <compass.h>
Public Member Functions | |
| BBM_IMPORT_CONFIG (LOSSFUNC) | |
| compass (LOSSFUNC &lossfunc, PARAM ¶m, const BOX &lower=BOX(), const BOX &upper=BOX(), Scalar tolerance=Constants::Epsilon(), Scalar stepSize=1.0, Scalar contraction=0.5, Scalar expansion=1.0, Mask mask=true) | |
| Constructor: compass search. | |
| Value | step (void) |
| probe each cardinal direction, and update the parameters to the one with the lowest loss. | |
| void | reset (void) |
| reset the step size | |
| Mask | is_converged (void) const |
| is_converged when _step < _tolerance | |
Private Attributes | |
| LOSSFUNC & | _lossfunc |
| PARAM & | _param |
| BOX | _lower |
| BOX | _upper |
| Value | _step |
| Value | _lossValue |
| std::vector< Scalar > | _directions |
| Scalar | _initialStep |
| Scalar | _tolerance |
| Scalar | _contraction |
| Scalar | _expansion |
| Mask | _mask |
Compass Search.
| LOSSFUNC | = loss function |
| PARAM | = parameters to optimize |
| BOX | = box constraint type (default=PARAM) |
Performs a pattern search by probing each cardinal direction in the parameter space.
When the Value type is a packet, this compass search will perform N parallel searches (where N == size of the packet).
Satisfies: concepts::optimization algorithm
|
inline |
Constructor: compass search.
| lossfunc | = loss function to minimize |
| param | = set of parameters to optimize |
| lower | = lower bound of box constraint |
| upper | = upper bound of box constraint |
| tolerance | = threshold on step size to determine convergence (default=Epsilon) |
| stepSize | = initial step size (default=1.0) |
| contraction | = reduction factor for step size if no probe in the cardinal directions improves the loss (default=0.5) |
| expansion | = expansion factor for step size if a good candinal direction was found (default=1.0) |
| BBM_IMPORT_CONFIG | ( | LOSSFUNC | ) |
|
inline |
is_converged when _step < _tolerance
|
inline |
reset the step size
|
inline |
probe each cardinal direction, and update the parameters to the one with the lowest loss.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |