numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class of Gaussian process optimization [28], [3]. More...
#include <num_collect/opt/gaussian_process_optimizer.h>
Public Types | |
using | objective_function_type = ObjectiveFunction |
Type of the objective function. | |
using | this_type = gaussian_process_optimizer<ObjectiveFunction> |
This class. | |
using | value_type = typename objective_function_type::value_type |
Type of function values. | |
using | variable_type = typename objective_function_type::variable_type |
Type of variables. | |
Public Member Functions | |
gaussian_process_optimizer (const objective_function_type &obj_fun=objective_function_type()) | |
Constructor. | |
void | change_objective_function (const objective_function_type &obj_fun) |
Change the objective function. | |
void | configure_iteration_logger (logging::iterations::iteration_logger< this_type > &iteration_logger) const |
Configure an iteration logger. | |
auto | evaluations () const noexcept -> index_type |
Get the number of function evaluations. | |
void | init (const variable_type &lower, const variable_type &upper) |
Initialize the algorithm. | |
auto | is_stop_criteria_satisfied () const -> bool |
Determine if stopping criteria of the algorithm are satisfied. | |
void | iterate () |
Iterate the algorithm once. | |
auto | iterations () const noexcept -> index_type |
Get the number of iterations. | |
auto | max_evaluations (index_type value) -> gaussian_process_optimizer & |
Set the maximum number of function evaluations. | |
auto | max_lower_bound_evaluations (index_type value) -> gaussian_process_optimizer & |
Set the maximum number of evaluations of lower bounds. | |
auto | opt_value () const -> const value_type & |
Get current optimal value. | |
auto | opt_variable () const -> const variable_type & |
Get current optimal variable. | |
Public Member Functions inherited from num_collect::opt::optimizer_base< gaussian_process_optimizer< ObjectiveFunction > > | |
optimizer_base (logging::log_tag_view tag) | |
Constructor. | |
auto | evaluations () const noexcept -> index_type |
Get the number of function evaluations. | |
auto | iterations () const noexcept -> index_type |
Get the number of iterations. | |
auto | opt_value () const |
Get current optimal value. | |
auto | opt_variable () const |
Get current optimal variable. | |
Public Member Functions inherited from num_collect::base::iterative_solver_base< gaussian_process_optimizer< ObjectiveFunction > > | |
iterative_solver_base (logging::log_tag_view tag) | |
Constructor. | |
iterative_solver_base (logging::log_tag_view tag) | |
Constructor. | |
auto | is_stop_criteria_satisfied () const -> bool |
Determine if stopping criteria of the algorithm are satisfied. | |
auto | is_stop_criteria_satisfied () const -> bool |
Determine if stopping criteria of the algorithm are satisfied. | |
void | iterate () |
Iterate the algorithm once. | |
void | iterate () |
Iterate the algorithm once. | |
void | solve () |
Solve the problem. | |
void | solve () |
Solve the problem. | |
Public Member Functions inherited from num_collect::logging::logging_mixin | |
logging_mixin (log_tag_view tag) | |
Constructor. | |
template<typename Child > | |
void | configure_child_algorithm_logger_if_exists (Child &child) |
Configure a logger of a child algorithm if exists. | |
auto | logger () const noexcept -> const num_collect::logging::logger & |
Access to the logger. | |
auto | logger () noexcept -> num_collect::logging::logger & |
Access to the logger. | |
Public Member Functions inherited from num_collect::logging::iterations::iteration_logger_mixin< gaussian_process_optimizer< ObjectiveFunction > > | |
iteration_logger_mixin ()=default | |
Constructor. | |
void | configure_iteration_logger (num_collect::logging::iterations::iteration_logger< gaussian_process_optimizer< ObjectiveFunction > > &iteration_logger) const |
Configure an iteration logger. | |
auto | initialize_iteration_logger () -> num_collect::logging::iterations::iteration_logger< gaussian_process_optimizer< ObjectiveFunction > > & |
Get the iteration logger. | |
Private Types | |
using | interpolator_type |
Type of interpolator. | |
Private Member Functions | |
void | evaluate_on (const variable_type &variable) |
Evaluate function value. | |
auto | try_find_and_evaluate_using_lower_bound () -> bool |
Try to find a sample point using lower bounds and evaluate a function value for the sample point. | |
Static Private Member Functions | |
static auto | correct_value_if_needed (value_type value) noexcept -> value_type |
Correct function values if needed. | |
Private Attributes | |
index_type | dim_ {0} |
Number of dimension. | |
index_type | evaluations_ {0} |
Number of function evaluations. | |
interpolator_type | interpolator_ {} |
Interpolator. | |
index_type | iterations_ {0} |
Number of iterations. | |
variable_type | lower_ {} |
Element-wise lower limit. | |
dividing_rectangles< any_objective_function< value_type(variable_type)> > | lower_bound_optimizer_ {} |
Optimizer of lower bounds. | |
index_type | max_evaluations_ {default_max_evaluations} |
Maximum number of function evaluations. | |
objective_function_type | obj_fun_ |
Objective function. | |
value_type | opt_value_ {} |
Current optimal value. | |
variable_type | opt_variable_ {} |
Current optimal variable. | |
variable_type | upper_ {} |
Element-wise upper limit. | |
Eigen::VectorX< value_type > | values_ {} |
Function values of sample points. | |
std::vector< variable_type > | variables_ {} |
Variables of sample points. | |
Static Private Attributes | |
static constexpr index_type | default_max_evaluations = 20 |
Default value of the maximum number of function evaluations. | |
static constexpr index_type | default_max_lower_bound_evaluations = 100 |
Default value of the maximum number of evaluations of lower bounds. | |
Additional Inherited Members | |
Protected Member Functions inherited from num_collect::base::iterative_solver_base< gaussian_process_optimizer< ObjectiveFunction > > | |
auto | derived () const noexcept -> const gaussian_process_optimizer< ObjectiveFunction > & |
Access derived object. | |
auto | derived () const noexcept -> const gaussian_process_optimizer< ObjectiveFunction > & |
Access derived object. | |
auto | derived () noexcept -> gaussian_process_optimizer< ObjectiveFunction > & |
Access derived object. | |
auto | derived () noexcept -> gaussian_process_optimizer< ObjectiveFunction > & |
Access derived object. | |
Class of Gaussian process optimization [28], [3].
ObjectiveFunction | Type of the objective function. |
Definition at line 60 of file gaussian_process_optimizer.h.
|
private |
Type of interpolator.
Definition at line 231 of file gaussian_process_optimizer.h.
using num_collect::opt::gaussian_process_optimizer< ObjectiveFunction >::objective_function_type = ObjectiveFunction |
Type of the objective function.
Definition at line 67 of file gaussian_process_optimizer.h.
using num_collect::opt::gaussian_process_optimizer< ObjectiveFunction >::this_type = gaussian_process_optimizer<ObjectiveFunction> |
This class.
Definition at line 64 of file gaussian_process_optimizer.h.
using num_collect::opt::gaussian_process_optimizer< ObjectiveFunction >::value_type = typename objective_function_type::value_type |
Type of function values.
Definition at line 73 of file gaussian_process_optimizer.h.
using num_collect::opt::gaussian_process_optimizer< ObjectiveFunction >::variable_type = typename objective_function_type::variable_type |
Type of variables.
Definition at line 70 of file gaussian_process_optimizer.h.
|
inlineexplicit |
Constructor.
[in] | obj_fun | Objective function. |
Definition at line 80 of file gaussian_process_optimizer.h.
|
inline |
Change the objective function.
[in] | obj_fun | Objective function. |
Definition at line 97 of file gaussian_process_optimizer.h.
|
inline |
Configure an iteration logger.
[in] | iteration_logger | Iteration logger. |
Definition at line 159 of file gaussian_process_optimizer.h.
|
inlinestaticnodiscardprivatenoexcept |
Correct function values if needed.
[in] | value | Function value. |
Definition at line 258 of file gaussian_process_optimizer.h.
|
inlineprivate |
Evaluate function value.
[in] | variable | Variable. |
Definition at line 239 of file gaussian_process_optimizer.h.
|
inlinenodiscardnoexcept |
Get the number of function evaluations.
Definition at line 194 of file gaussian_process_optimizer.h.
|
inline |
Initialize the algorithm.
[in] | lower | Lower limit. |
[in] | upper | Upper limit. |
Definition at line 107 of file gaussian_process_optimizer.h.
|
inlinenodiscard |
Determine if stopping criteria of the algorithm are satisfied.
Definition at line 152 of file gaussian_process_optimizer.h.
|
inline |
Iterate the algorithm once.
init
functions) are assumed to have been done. Definition at line 136 of file gaussian_process_optimizer.h.
|
inlinenodiscardnoexcept |
Get the number of iterations.
Definition at line 187 of file gaussian_process_optimizer.h.
|
inline |
Set the maximum number of function evaluations.
[in] | value | Value. |
Definition at line 204 of file gaussian_process_optimizer.h.
|
inline |
Set the maximum number of evaluations of lower bounds.
[in] | value | Value. |
Definition at line 218 of file gaussian_process_optimizer.h.
|
inlinenodiscard |
Get current optimal value.
Definition at line 180 of file gaussian_process_optimizer.h.
|
inlinenodiscard |
Get current optimal variable.
Definition at line 173 of file gaussian_process_optimizer.h.
|
inlinenodiscardprivate |
Try to find a sample point using lower bounds and evaluate a function value for the sample point.
Definition at line 274 of file gaussian_process_optimizer.h.
|
staticconstexprprivate |
Default value of the maximum number of function evaluations.
Definition at line 343 of file gaussian_process_optimizer.h.
|
staticconstexprprivate |
Default value of the maximum number of evaluations of lower bounds.
Definition at line 349 of file gaussian_process_optimizer.h.
|
private |
Number of dimension.
Definition at line 328 of file gaussian_process_optimizer.h.
|
private |
Number of function evaluations.
Definition at line 340 of file gaussian_process_optimizer.h.
|
private |
Interpolator.
Definition at line 313 of file gaussian_process_optimizer.h.
|
private |
Number of iterations.
Definition at line 337 of file gaussian_process_optimizer.h.
|
private |
Element-wise lower limit.
Definition at line 322 of file gaussian_process_optimizer.h.
|
private |
Optimizer of lower bounds.
Definition at line 307 of file gaussian_process_optimizer.h.
|
private |
Maximum number of function evaluations.
Definition at line 346 of file gaussian_process_optimizer.h.
|
private |
Objective function.
Definition at line 310 of file gaussian_process_optimizer.h.
|
private |
Current optimal value.
Definition at line 334 of file gaussian_process_optimizer.h.
|
private |
Current optimal variable.
Definition at line 331 of file gaussian_process_optimizer.h.
|
private |
Element-wise upper limit.
Definition at line 325 of file gaussian_process_optimizer.h.
|
private |
Function values of sample points.
Definition at line 319 of file gaussian_process_optimizer.h.
|
private |
Variables of sample points.
Definition at line 316 of file gaussian_process_optimizer.h.