class documentation

`class GaussSampler(StatisticalModelSamplerWithZeroMeanBaseClass):`

Known subclasses: `cma.sampler.GaussDiagonalSampler`, `cma.sampler.GaussFullSampler`, `cma.sampler.GaussStandardConstant`

View In Hierarchy

Undocumented

 Method `__init__` declarative init, doesn't need to be executed Method `set_H` set Hessian w.r.t. which to compute the eigen spectrum. Method `set_H_by_f` set Hessian from f at x0. Instance Variable `dimension` Undocumented Property `chin` approximation of the expected length when isotropic with variance 1. Property `corr_condition` condition number of the correlation matrix Property `eigenspectrum` return eigen spectrum w.r.t. H like sqrt(H) C sqrt(H) Instance Variable `_left` Undocumented Instance Variable `_right` Undocumented

Inherited from `StatisticalModelSamplerWithZeroMeanBaseClass`:

 Method `__imul__` Undocumented Method `inverse_hessian_scalar_correction` return scalar correction alpha such that X and f fit to f(x) = (x-mean) (alpha * C)**-1 (x-mean) Method `norm` return Mahalanobis norm of `x` w.r.t. the statistical model Method `parameters` return `dict` with (default) parameters, e.g., `c1` and `cmu`. Method `sample` return list of i.i.d. samples. Method `to_linear_transformation` return associated linear transformation Method `to_linear_transformation_inverse` return inverse of associated linear transformation Method `transform` transform x as implied from the distribution parameters Method `transform_inverse` Undocumented Method `update` vectors is a list of samples, weights a corrsponding list of learning rates Property `condition_number` Undocumented Property `covariance_matrix` Undocumented Property `variances` vector of coordinate-wise (marginal) variances Instance Variable `_lam` Undocumented Instance Variable `_mueff` Undocumented Instance Variable `_parameters` Undocumented
def __init__(self):
overrides `cma.interfaces.StatisticalModelSamplerWithZeroMeanBaseClass.__init__`
overridden in `cma.sampler.GaussDiagonalSampler`, `cma.sampler.GaussFullSampler`, `cma.sampler.GaussStandardConstant`

declarative init, doesn't need to be executed

def set_H(self, H):

set Hessian w.r.t. which to compute the eigen spectrum.

def set_H_by_f(self, f, x0, eps=None):

set Hessian from f at x0.

```>>> import numpy as np, cma
>>> es = cma.CMAEvolutionStrategy(3 * [1], 1, {'verbose':-9})
>>> es.sm.set_H_by_f(cma.ff.elli, 3 * [0])  # Hessian of cma.ff.elli```

Now the eigen spectrum of H^1/2 C H^1/2 where H is the Hessian of cma.ff.elli is given by the `spectrum` property.

dimension: `int` =
overridden in `cma.sampler.GaussDiagonalSampler`, `cma.sampler.GaussFullSampler`, `cma.sampler.GaussStandardConstant`

Undocumented

@property
chin =

approximation of the expected length when isotropic with variance 1.

The exact value could be computed by:

```from scipy.special import gamma
return 2**0.5 * gamma((self.dimension+1) / 2) / gamma(self.dimension / 2)
```

The approximation obeys chin < chin_hat < (1 + 5e-5) * chin.

@property
corr_condition =
overridden in `cma.sampler.GaussFullSampler`

condition number of the correlation matrix

@property
eigenspectrum =

return eigen spectrum w.r.t. H like sqrt(H) C sqrt(H)

_left =

Undocumented

_right =

Undocumented