queso-0.57.1
|
This class provides options for a Optimizer. More...
#include <OptimizerOptions.h>
Public Member Functions | |
Constructor/Destructor methods | |
OptimizerOptions () | |
Default constructor. All options have their default values. More... | |
OptimizerOptions (const BaseEnvironment *env, const char *prefix="") | |
A constructor that takes the environment for parsing input file options. More... | |
OptimizerOptions (const OptimizerOptions &rhs) | |
Copy constructor. More... | |
virtual | ~OptimizerOptions () |
Destructor. More... | |
Public Attributes | |
std::string | m_prefix |
std::string | m_help |
If this string is non-empty, options are print to the output file. More... | |
unsigned int | m_maxIterations |
The maximum number of iterations to do for optimization. Default is 100. More... | |
double | m_tolerance |
The tolerance at which optimization stops. Default is 1e-3. More... | |
double | m_finiteDifferenceStepSize |
The step size used to compute gradients from finite differencing. Default is 1e-4. More... | |
std::string | m_solverType |
The optimization algorithm to use. Default is bfgs2. More... | |
double | m_fstepSize |
The size of the initial trial steps for optimizing without gradients. Default is 0.1. More... | |
double | m_fdfstepSize |
The size of the first step when optimizing with gradients. Default is 1.0. More... | |
double | m_lineTolerance |
Accuracy to which to solve line minization to. Default is 0.1. More... | |
Private Member Functions | |
void | checkOptions () |
Private Attributes | |
const BaseEnvironment * | m_env |
BoostInputOptionsParser * | m_parser |
std::string | m_option_help |
std::string | m_option_maxIterations |
Option name for OptimizerOptions::m_maxIterations. Default is m_prefix + "optimizer_maxIterations". More... | |
std::string | m_option_tolerance |
Option name for OptimizerOptions::m_tolerance. Default is m_prefix + "optimizer_tolerance". More... | |
std::string | m_option_finiteDifferenceStepSize |
Option name for OptimizerOptions::m_finiteDifferenceStepSize. Default is m_prefix + "optimizer_finiteDifferenceStepSize". More... | |
std::string | m_option_solverType |
Option name for OptimizerOptions::m_solverType. Default is m_prefix + "optimizer_solverType". More... | |
std::string | m_option_fstepSize |
Option name for OptimizerOptions::m_fstepSize. Default is m_prefix + "optimizer_fstepSize". More... | |
std::string | m_option_fdfstepSize |
Option name for OptimizerOptions::m_fdfstepSize. Default is m_prefix + "optimizer_fdfStepSize". More... | |
std::string | m_option_lineTolerance |
Option name for OptimizerOptions::m_lineTolerance. Default is m_prefix + "optimizer_lineTolerance". More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const OptimizerOptions &obj) |
This class provides options for a Optimizer.
Definition at line 60 of file OptimizerOptions.h.
QUESO::OptimizerOptions::OptimizerOptions | ( | ) |
Default constructor. All options have their default values.
Definition at line 38 of file OptimizerOptions.C.
QUESO::OptimizerOptions::OptimizerOptions | ( | const BaseEnvironment * | env, |
const char * | prefix = "" |
||
) |
A constructor that takes the environment for parsing input file options.
Definition at line 63 of file OptimizerOptions.C.
References checkOptions(), QUESO::BoostInputOptionsParser::getOption(), QUESO::BaseEnvironment::input(), m_env, m_fdfstepSize, m_finiteDifferenceStepSize, m_fstepSize, m_help, m_lineTolerance, m_maxIterations, m_option_fdfstepSize, m_option_finiteDifferenceStepSize, m_option_fstepSize, m_option_help, m_option_lineTolerance, m_option_maxIterations, m_option_solverType, m_option_tolerance, m_parser, m_solverType, m_tolerance, QUESO::BoostInputOptionsParser::registerOption(), and QUESO::BoostInputOptionsParser::scanInputFile().
QUESO::OptimizerOptions::OptimizerOptions | ( | const OptimizerOptions & | rhs | ) |
Copy constructor.
Definition at line 133 of file OptimizerOptions.C.
|
virtual |
|
private |
Definition at line 161 of file OptimizerOptions.C.
References m_fdfstepSize, m_finiteDifferenceStepSize, m_fstepSize, m_lineTolerance, m_maxIterations, and m_tolerance.
Referenced by OptimizerOptions().
|
friend |
Definition at line 172 of file OptimizerOptions.C.
|
private |
Definition at line 136 of file OptimizerOptions.h.
Referenced by OptimizerOptions().
double QUESO::OptimizerOptions::m_fdfstepSize |
The size of the first step when optimizing with gradients. Default is 1.0.
Definition at line 126 of file OptimizerOptions.h.
Referenced by checkOptions(), QUESO::operator<<(), and OptimizerOptions().
double QUESO::OptimizerOptions::m_finiteDifferenceStepSize |
The step size used to compute gradients from finite differencing. Default is 1e-4.
This is only done when analytical gradients are not provided (either by the user or by QUESO).
Definition at line 101 of file OptimizerOptions.h.
Referenced by checkOptions(), QUESO::operator<<(), and OptimizerOptions().
double QUESO::OptimizerOptions::m_fstepSize |
The size of the initial trial steps for optimizing without gradients. Default is 0.1.
The initial trial steps is actually a vector of size equal to the number of parameters, and this vector is set to m_fstepSize
in each component.
Definition at line 123 of file OptimizerOptions.h.
Referenced by checkOptions(), QUESO::operator<<(), and OptimizerOptions().
std::string QUESO::OptimizerOptions::m_help |
If this string is non-empty, options are print to the output file.
Definition at line 81 of file OptimizerOptions.h.
Referenced by OptimizerOptions().
double QUESO::OptimizerOptions::m_lineTolerance |
Accuracy to which to solve line minization to. Default is 0.1.
The exact meaning of this parameter depends on the method used. It's not used for algorithms that don't use derivatives.
Definition at line 133 of file OptimizerOptions.h.
Referenced by checkOptions(), QUESO::operator<<(), and OptimizerOptions().
unsigned int QUESO::OptimizerOptions::m_maxIterations |
The maximum number of iterations to do for optimization. Default is 100.
Definition at line 84 of file OptimizerOptions.h.
Referenced by checkOptions(), QUESO::operator<<(), and OptimizerOptions().
|
private |
Option name for OptimizerOptions::m_fdfstepSize. Default is m_prefix + "optimizer_fdfStepSize".
Definition at line 154 of file OptimizerOptions.h.
Referenced by QUESO::operator<<(), and OptimizerOptions().
|
private |
Option name for OptimizerOptions::m_finiteDifferenceStepSize. Default is m_prefix + "optimizer_finiteDifferenceStepSize".
Definition at line 148 of file OptimizerOptions.h.
Referenced by QUESO::operator<<(), and OptimizerOptions().
|
private |
Option name for OptimizerOptions::m_fstepSize. Default is m_prefix + "optimizer_fstepSize".
Definition at line 152 of file OptimizerOptions.h.
Referenced by QUESO::operator<<(), and OptimizerOptions().
|
private |
Definition at line 141 of file OptimizerOptions.h.
Referenced by OptimizerOptions().
|
private |
Option name for OptimizerOptions::m_lineTolerance. Default is m_prefix + "optimizer_lineTolerance".
Definition at line 156 of file OptimizerOptions.h.
Referenced by QUESO::operator<<(), and OptimizerOptions().
|
private |
Option name for OptimizerOptions::m_maxIterations. Default is m_prefix + "optimizer_maxIterations".
Definition at line 144 of file OptimizerOptions.h.
Referenced by QUESO::operator<<(), and OptimizerOptions().
|
private |
Option name for OptimizerOptions::m_solverType. Default is m_prefix + "optimizer_solverType".
Definition at line 150 of file OptimizerOptions.h.
Referenced by QUESO::operator<<(), and OptimizerOptions().
|
private |
Option name for OptimizerOptions::m_tolerance. Default is m_prefix + "optimizer_tolerance".
Definition at line 146 of file OptimizerOptions.h.
Referenced by QUESO::operator<<(), and OptimizerOptions().
|
private |
Definition at line 138 of file OptimizerOptions.h.
Referenced by OptimizerOptions().
std::string QUESO::OptimizerOptions::m_prefix |
Definition at line 78 of file OptimizerOptions.h.
std::string QUESO::OptimizerOptions::m_solverType |
The optimization algorithm to use. Default is bfgs2.
Choices are:
Definition at line 115 of file OptimizerOptions.h.
Referenced by QUESO::operator<<(), and OptimizerOptions().
double QUESO::OptimizerOptions::m_tolerance |
The tolerance at which optimization stops. Default is 1e-3.
The tolerance is measured in terms of the 2-norm of the gradient of the objective function for optimizers that use derivatives.
For optimizers that do not use derivatives, the tolerance is measured in terms of the size of the size of the simplex for the simplex optimizers.
Definition at line 94 of file OptimizerOptions.h.
Referenced by checkOptions(), QUESO::operator<<(), and OptimizerOptions().