SG++-Doxygen-Documentation
sgpp::optimization::optimizer::DifferentialEvolution Class Reference

Gradient-free Differential Evolution method. More...

#include <DifferentialEvolution.hpp>

Inheritance diagram for sgpp::optimization::optimizer::DifferentialEvolution:
sgpp::optimization::optimizer::UnconstrainedOptimizer

Public Member Functions

void clone (std::unique_ptr< UnconstrainedOptimizer > &clone) const override
 
 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. More...
 
 DifferentialEvolution (const DifferentialEvolution &other)
 Copy constructor. More...
 
size_t getPopulationSize () const
 
void optimize () override
 Pure virtual method for optimization of the objective function. More...
 
void setPopulationSize (size_t populationSize)
 
 ~DifferentialEvolution () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
const base::DataMatrixgetHistoryOfOptimalPoints () const
 
const base::DataVectorgetHistoryOfOptimalValues () const
 
size_t getN () const
 
ScalarFunctiongetObjectiveFunction () const
 
const base::DataVectorgetOptimalPoint () const
 
double getOptimalValue () const
 
const base::DataVectorgetStartingPoint () const
 
void setN (size_t N)
 
void setStartingPoint (const base::DataVector &startingPoint)
 
 UnconstrainedOptimizer (const ScalarFunction &f, size_t N=DEFAULT_N)
 Constructor. More...
 
 UnconstrainedOptimizer (const UnconstrainedOptimizer &other)
 Copy constructor. More...
 
virtual ~UnconstrainedOptimizer ()
 Destructor. More...
 

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< ScalarFunctionf
 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...
 

Detailed Description

Gradient-free Differential Evolution method.

Constructor & Destructor Documentation

◆ DifferentialEvolution() [1/2]

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.

Parameters
fobjective function
maxFcnEvalCountmaximal number of function evaluations
populationSizenumber of individuals (default: \(10d\))
crossoverProbabilitycrossover probability
scalingFactorcrossover scaling factor
idleGenerationsCountstopping criterion parameter 1
avgImprovementThresholdstopping criterion parameter 2
maxDistanceThresholdstopping criterion parameter 3

Referenced by clone().

◆ DifferentialEvolution() [2/2]

sgpp::optimization::optimizer::DifferentialEvolution::DifferentialEvolution ( const DifferentialEvolution other)

Copy constructor.

Parameters
otheroptimizer to be copied

◆ ~DifferentialEvolution()

sgpp::optimization::optimizer::DifferentialEvolution::~DifferentialEvolution ( )
override

Destructor.

Member Function Documentation

◆ clone()

void sgpp::optimization::optimizer::DifferentialEvolution::clone ( std::unique_ptr< UnconstrainedOptimizer > &  clone) const
overridevirtual
Parameters
[out]clonepointer to cloned object

Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.

References DifferentialEvolution().

◆ getPopulationSize()

size_t sgpp::optimization::optimizer::DifferentialEvolution::getPopulationSize ( ) const
Returns
number of individuals

References populationSize.

◆ optimize()

◆ setPopulationSize()

void sgpp::optimization::optimizer::DifferentialEvolution::setPopulationSize ( size_t  populationSize)
Parameters
populationSizenumber of individuals

References populationSize.

Member Data Documentation

◆ avgImprovementThreshold

double sgpp::optimization::optimizer::DifferentialEvolution::avgImprovementThreshold
protected

stopping criterion parameter 2

Referenced by optimize().

◆ crossoverProbability

double sgpp::optimization::optimizer::DifferentialEvolution::crossoverProbability
protected

crossover probability

Referenced by optimize().

◆ DEFAULT_AVG_IMPROVEMENT_THRESHOLD

constexpr double sgpp::optimization::optimizer::DifferentialEvolution::DEFAULT_AVG_IMPROVEMENT_THRESHOLD = 1e-6
static

default stopping criterion parameter 2

◆ DEFAULT_CROSSOVER_PROBABILITY

constexpr double sgpp::optimization::optimizer::DifferentialEvolution::DEFAULT_CROSSOVER_PROBABILITY = 0.5
static

default crossover probability

◆ DEFAULT_IDLE_GENERATIONS_COUNT

const size_t sgpp::optimization::optimizer::DifferentialEvolution::DEFAULT_IDLE_GENERATIONS_COUNT = 20
static

default stopping criterion parameter 1

◆ DEFAULT_MAX_DISTANCE_THRESHOLD

constexpr double sgpp::optimization::optimizer::DifferentialEvolution::DEFAULT_MAX_DISTANCE_THRESHOLD = 1e-4
static

default stopping criterion parameter 3

◆ DEFAULT_SCALING_FACTOR

constexpr double sgpp::optimization::optimizer::DifferentialEvolution::DEFAULT_SCALING_FACTOR = 0.6
static

default crossover scaling factor

◆ idleGenerationsCount

size_t sgpp::optimization::optimizer::DifferentialEvolution::idleGenerationsCount
protected

stopping criterion parameter 1

Referenced by optimize().

◆ maxDistanceThreshold

double sgpp::optimization::optimizer::DifferentialEvolution::maxDistanceThreshold
protected

stopping criterion parameter 3

Referenced by optimize().

◆ populationSize

size_t sgpp::optimization::optimizer::DifferentialEvolution::populationSize
protected

number of individuals

Referenced by getPopulationSize(), optimize(), and setPopulationSize().

◆ scalingFactor

double sgpp::optimization::optimizer::DifferentialEvolution::scalingFactor
protected

crossover scaling factor

Referenced by optimize().


The documentation for this class was generated from the following files: