cma⚓︎
Covariance matrix adaptation (CMA).
CMA
⚓︎
__call__(cov, step, X, J)
⚓︎
Performs the CMA update.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cov
|
array_like, of shape (d, d)
|
Current covariance or correlation matrix. |
required |
step
|
array_like, of shape (d,)
|
New step of control vector. Used to update the evolution path. |
required |
X
|
array_like, of shape (n, d)
|
Control ensemble of size n. |
required |
J
|
array_like, of shape (n,)
|
Objective ensemble of size n. |
required |
Returns:
Name | Type | Description |
---|---|---|
out |
array_like, of shape (d, d)
|
CMA updated covariance (correlation) matrix. |
__init__(ne, dim, alpha_mu=None, n_mu=None, alpha_1=None, alpha_c=None, corr_update=False, equal_weights=True)
⚓︎
This is a rather simple simple CMA class hansen2006
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ne
|
int
|
Ensemble size |
required |
dim
|
int
|
Dimensions of control vector |
required |
alpha_mu
|
float
|
Learning rate for rank-mu update. If None, value proposed in [1] is used. |
None
|
n_mu
|
int, `n_mu < ne`
|
Number of best samples of ne, to be used for rank-mu update. Default is int(ne/2). |
None
|
alpha_1
|
float
|
Learning rate fro rank-one update. If None, value proposed in [1] is used. |
None
|
alpha_c
|
float
|
Parameter (inverse if backwards time horizen)for evolution path update in the rank-one update. See [1] for more info. If None, value proposed in [1] is used. |
None
|
corr_update
|
bool
|
If True, CMA is used to update a correlation matrix. Default is False. |
False
|
equal_weights
|
bool
|
If True, all n_mu members are assign equal weighting, |
True
|