SG++-Doxygen-Documentation
|
Gradient-free Differential Evolution method. More...
#include <DifferentialEvolution.hpp>
Static Public Attributes | |
static constexpr double | DEFAULT_AVG_IMPROVEMENT_THRESHOLD = 1e-6 |
default stopping criterion parameter 2 More... | |
static constexpr double | DEFAULT_CROSSOVER_PROBABILITY = 0.5 |
default crossover probability More... | |
static const size_t | DEFAULT_IDLE_GENERATIONS_COUNT = 20 |
default stopping criterion parameter 1 More... | |
static constexpr double | DEFAULT_MAX_DISTANCE_THRESHOLD = 1e-4 |
default stopping criterion parameter 3 More... | |
static constexpr double | DEFAULT_SCALING_FACTOR = 0.6 |
default crossover scaling factor More... | |
Static Public Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer | |
static const size_t | DEFAULT_N = 1000 |
default maximal number of iterations or function evaluations More... | |
Protected Attributes | |
double | avgImprovementThreshold |
stopping criterion parameter 2 More... | |
double | crossoverProbability |
crossover probability More... | |
size_t | idleGenerationsCount |
stopping criterion parameter 1 More... | |
double | maxDistanceThreshold |
stopping criterion parameter 3 More... | |
size_t | populationSize |
number of individuals More... | |
double | scalingFactor |
crossover scaling factor More... | |
Protected Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer | |
std::unique_ptr< ScalarFunction > | f |
objective function More... | |
base::DataVector | fHist |
search history vector (optimal values) More... | |
double | fOpt |
result of optimization (optimal function value) More... | |
size_t | N |
maximal number of iterations or function evaluations More... | |
base::DataVector | x0 |
starting point More... | |
base::DataMatrix | xHist |
search history matrix (optimal points) More... | |
base::DataVector | xOpt |
result of optimization (location of optimum) More... | |
Gradient-free Differential Evolution method.
sgpp::optimization::optimizer::DifferentialEvolution::DifferentialEvolution | ( | const ScalarFunction & | f, |
size_t | maxFcnEvalCount = DEFAULT_N , |
||
size_t | populationSize = 0 , |
||
double | crossoverProbability = DEFAULT_CROSSOVER_PROBABILITY , |
||
double | scalingFactor = DEFAULT_SCALING_FACTOR , |
||
size_t | idleGenerationsCount = DEFAULT_IDLE_GENERATIONS_COUNT , |
||
double | avgImprovementThreshold = DEFAULT_AVG_IMPROVEMENT_THRESHOLD , |
||
double | maxDistanceThreshold = DEFAULT_MAX_DISTANCE_THRESHOLD |
||
) |
Constructor.
f | objective function |
maxFcnEvalCount | maximal number of function evaluations |
populationSize | number of individuals (default: \(10d\)) |
crossoverProbability | crossover probability |
scalingFactor | crossover scaling factor |
idleGenerationsCount | stopping criterion parameter 1 |
avgImprovementThreshold | stopping criterion parameter 2 |
maxDistanceThreshold | stopping criterion parameter 3 |
Referenced by clone().
sgpp::optimization::optimizer::DifferentialEvolution::DifferentialEvolution | ( | const DifferentialEvolution & | other | ) |
Copy constructor.
other | optimizer to be copied |
|
override |
Destructor.
|
overridevirtual |
[out] | clone | pointer to cloned object |
Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.
References DifferentialEvolution().
size_t sgpp::optimization::optimizer::DifferentialEvolution::getPopulationSize | ( | ) | const |
References populationSize.
|
overridevirtual |
Pure virtual method for optimization of the objective function.
The result of the optimization process can be obtained by member functions, e.g., getOptimalPoint() and getOptimalValue().
Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.
References sgpp::base::DataVector::append(), sgpp::base::DataMatrix::appendRow(), avgImprovementThreshold, chess::b, crossoverProbability, sgpp::optimization::ScalarFunction::eval(), sgpp::optimization::optimizer::UnconstrainedOptimizer::f, sgpp::optimization::optimizer::UnconstrainedOptimizer::fHist, sgpp::optimization::optimizer::UnconstrainedOptimizer::fOpt, sgpp::optimization::RandomNumberGenerator::getInstance(), sgpp::optimization::Printer::getInstance(), sgpp::optimization::RandomNumberGenerator::getUniformIndexRN(), sgpp::optimization::RandomNumberGenerator::getUniformRN(), python.statsfileInfo::i, idleGenerationsCount, python.utils.statsfile2gnuplot::j, maxDistanceThreshold, sgpp::optimization::optimizer::UnconstrainedOptimizer::N, populationSize, sgpp::optimization::Printer::printStatusBegin(), sgpp::optimization::Printer::printStatusEnd(), sgpp::optimization::Printer::printStatusUpdate(), sgpp::base::DataMatrix::resize(), scalingFactor, sgpp::optimization::optimizer::UnconstrainedOptimizer::xHist, and sgpp::optimization::optimizer::UnconstrainedOptimizer::xOpt.
void sgpp::optimization::optimizer::DifferentialEvolution::setPopulationSize | ( | size_t | populationSize | ) |
populationSize | number of individuals |
References populationSize.
|
protected |
stopping criterion parameter 2
Referenced by optimize().
|
protected |
crossover probability
Referenced by optimize().
|
static |
default stopping criterion parameter 2
|
static |
default crossover probability
|
static |
default stopping criterion parameter 1
|
static |
default stopping criterion parameter 3
|
static |
default crossover scaling factor
|
protected |
stopping criterion parameter 1
Referenced by optimize().
|
protected |
stopping criterion parameter 3
Referenced by optimize().
|
protected |
number of individuals
Referenced by getPopulationSize(), optimize(), and setPopulationSize().
|
protected |
crossover scaling factor
Referenced by optimize().