15 #ifndef MLPACK_CORE_OPTIMIZERS_CMAES_CMAES_HPP 16 #define MLPACK_CORE_OPTIMIZERS_CMAES_CMAES_HPP 24 namespace optimization {
65 template<
typename SelectionPolicyType = FullSelection>
87 CMAES(
const size_t lambda = 0,
88 const double lowerBound = -10,
89 const double upperBound = 10,
90 const size_t batchSize = 32,
91 const size_t maxIterations = 1000,
92 const double tolerance = 1e-5,
93 const SelectionPolicyType& selectionPolicy = SelectionPolicyType());
105 template<
typename DecomposableFunctionType>
106 double Optimize(DecomposableFunctionType&
function, arma::mat& iterate);
157 size_t maxIterations;
163 SelectionPolicyType selectionPolicy;
169 template<
typename SelectionPolicyType = RandomSelection>
176 #include "cmaes_impl.hpp" double & Tolerance()
Modify the tolerance for termination.
double Optimize(DecomposableFunctionType &function, arma::mat &iterate)
Optimize the given function using CMA-ES.
double & UpperBound()
Modify the upper bound of decision variables.
CMAES(const size_t lambda=0, const double lowerBound=-10, const double upperBound=10, const size_t batchSize=32, const size_t maxIterations=1000, const double tolerance=1e-5, const SelectionPolicyType &selectionPolicy=SelectionPolicyType())
Construct the CMA-ES optimizer with the given function and parameters.
The core includes that mlpack expects; standard C++ includes and Armadillo.
size_t & BatchSize()
Modify the batch size.
double Tolerance() const
Get the tolerance for termination.
size_t BatchSize() const
Get the batch size.
double LowerBound() const
Get the lower bound of decision variables.
SelectionPolicyType & SelectionPolicy()
Modify the selection policy.
const SelectionPolicyType & SelectionPolicy() const
Get the selection policy.
size_t MaxIterations() const
Get the maximum number of iterations (0 indicates no limit).
size_t PopulationSize() const
Get the step size.
CMA-ES - Covariance Matrix Adaptation Evolution Strategy is s a stochastic search algorithm...
size_t & PopulationSize()
Modify the step size.
double UpperBound() const
Get the upper bound of decision variables.
size_t & MaxIterations()
Modify the maximum number of iterations (0 indicates no limit).
double & LowerBound()
Modify the lower bound of decision variables.