class documentation

class CMAParameters(object):

Constructor: CMAParameters(N, opts, ccovfac, verbose)

View In Hierarchy

strategy parameters like population size and learning rates.

Note:
contrary to CMAOptions, CMAParameters is not (yet) part of the "user-interface" and subject to future changes (it might become a collections.namedtuple)

Example

>>> import cma
>>> es = cma.CMAEvolutionStrategy(20 * [0.1], 1)  #doctest: +ELLIPSIS
(6_w,12)-aCMA-ES (mu_w=3.7,w_1=40%) in dimension 20 (seed=...)
>>>
>>> type(es.sp)  # sp contains the strategy parameters
<class 'cma.options_parameters.CMAParameters'>
>>> es.sp.disp()  #doctest: +ELLIPSIS
{'CMA_on': True,
 'N': 20,
 'c1': 0.00437235...,
 'c1_sep': ...0.0343279...,
 'cc': 0.171767...,
 'cc_sep': 0.252594...,
 'cmean': array(1...,
 'cmu': 0.00921656...,
 'cmu_sep': ...0.0565385...,
 'lam_mirr': 0,
 'mu': 6,
 'popsize': 12,
 'weights': [0.4024029428...,
             0.2533890840...,
             0.1662215645...,
             0.1043752252...,
             0.05640347757...,
             0.01720770576...,
             -0.05018713636...,
             -0.1406167894...,
             -0.2203813963...,
             -0.2917332686...,
             -0.3562788884...,
             -0.4152044225...]}
>>>
See Also
CMAOptions, CMAEvolutionStrategy
Method __init__ Compute strategy parameters, mainly depending on dimension and population size, by calling set
Method disp Undocumented
Method set Compute strategy parameters as a function of dimension and population size
Instance Variable N Undocumented
Instance Variable popsize number of candidation solutions per iteration, AKA population size
def __init__(self, N, opts, ccovfac=1, verbose=True):

Compute strategy parameters, mainly depending on dimension and population size, by calling set

def disp(self):

Undocumented

def set(self, opts, popsize=None, ccovfac=1, verbose=True):

Compute strategy parameters as a function of dimension and population size

N =

Undocumented

popsize: int =

number of candidation solutions per iteration, AKA population size