Step size adaptation based on the success of the new population compared to the old. More...
#include <shark/Algorithms/DirectSearch/Operators/PopulationBasedStepSizeAdaptation.h>
Public Member Functions | |
PopulationBasedStepSizeAdaptation () | |
double | targetSuccessRate () const |
double & | targetSuccessRate () |
double | learningRate () const |
double & | learningRate () |
double | dampingFactor () const |
double & | dampingFactor () |
double | stepSize () const |
void | init (double initialStepSize) |
Initializes a new trial by setting the initial learning rate and resetting the internal values. More... | |
template<class Population > | |
void | update (Population const &offspring) |
updates the step size using the newly sampled population More... | |
Protected Attributes | |
double | m_stepSize |
current value for the step size More... | |
RealVector | m_prevFitness |
fitness values of the previous iteration for ranking More... | |
double | m_s |
The time average of the population success. More... | |
double | m_targetSuccessRate |
double | m_c |
double | m_d |
Step size adaptation based on the success of the new population compared to the old.
This is the step size adaptation algorithm as proposed in Ilya Loshchilov, "A Computationally Efficient Limited Memory CMA-ES for Large Scale Optimization"
It ranks the old and new population together and checks whether the mean rank of the new population is lower than the old one in this combined population. If this is true, the step size is increased in an exponential fashion. More formally, let \( r_t(i) \) be the rank of the i-th individual in the current population in the combined ranking and \( r_{t-1}(i) \) the rank of the i-th previous individual. Then we have
\[ z_t \leftarrow \frac 1 {\lamba^2} \sum_i^{\lambda} r_{t-1}(i) - r_t(i) - z*\]
where \( z* \) is a target success value, which defaults to 0.25 this statistic is stabilised using an exponential average:
\[ s_t \leftarrow (1-c)*s_{t-1} + c*z_t \]
where the learning rate c defaults to 0.3 finally we adapt the step size sigma by
\[ \sigma_t = \sigma_{t-1} exp(s_t/d) \]
where the damping factor d defaults to 1
Definition at line 53 of file PopulationBasedStepSizeAdaptation.h.
|
inline |
Definition at line 55 of file PopulationBasedStepSizeAdaptation.h.
|
inline |
Definition at line 75 of file PopulationBasedStepSizeAdaptation.h.
References m_d.
|
inline |
Definition at line 79 of file PopulationBasedStepSizeAdaptation.h.
References m_d.
|
inline |
Initializes a new trial by setting the initial learning rate and resetting the internal values.
Definition at line 88 of file PopulationBasedStepSizeAdaptation.h.
References m_prevFitness, m_s, and m_stepSize.
|
inline |
Definition at line 67 of file PopulationBasedStepSizeAdaptation.h.
References m_c.
|
inline |
Definition at line 71 of file PopulationBasedStepSizeAdaptation.h.
References m_c.
|
inline |
Definition at line 83 of file PopulationBasedStepSizeAdaptation.h.
References m_stepSize.
|
inline |
Definition at line 59 of file PopulationBasedStepSizeAdaptation.h.
References m_targetSuccessRate.
|
inline |
Definition at line 63 of file PopulationBasedStepSizeAdaptation.h.
References m_targetSuccessRate.
|
inline |
updates the step size using the newly sampled population
The offspring is assumed to be ordered in ascending order by their penalizedFitness (this is the same as ordering by the unpenalized fitness in an unconstrained setting)
Definition at line 99 of file PopulationBasedStepSizeAdaptation.h.
References lambda, m_c, m_d, m_prevFitness, m_s, m_stepSize, m_targetSuccessRate, and shark::penalizedFitness().
|
protected |
Definition at line 148 of file PopulationBasedStepSizeAdaptation.h.
Referenced by learningRate(), and update().
|
protected |
Definition at line 149 of file PopulationBasedStepSizeAdaptation.h.
Referenced by dampingFactor(), and update().
|
protected |
fitness values of the previous iteration for ranking
Definition at line 143 of file PopulationBasedStepSizeAdaptation.h.
|
protected |
The time average of the population success.
Definition at line 144 of file PopulationBasedStepSizeAdaptation.h.
|
protected |
current value for the step size
Definition at line 142 of file PopulationBasedStepSizeAdaptation.h.
Referenced by init(), stepSize(), and update().
|
protected |
Definition at line 147 of file PopulationBasedStepSizeAdaptation.h.
Referenced by targetSuccessRate(), and update().