Home | Trees | Indices | Help |
|
---|
|
object --+ | dict --+ | CMAOptions
CMAOptions() returns a dictionary with the available options and their default values for class CMAEvolutionStrategy.
CMAOptions('pop') returns a subset of recognized options that contain 'pop' in there keyword name or (default) value or description.
CMAOptions(opts) returns the subset of recognized options in dict(opts).
Option values can be "written" in a string and, when passed to fmin or CMAEvolutionStrategy, are evaluated using "N" and "popsize" as known values for dimension and population size (sample size, number of new solutions per iteration). All default option values are such a string.
CMAOptions entries starting with tol are termination "tolerances".
For tolstagnation
, the median over the first and the second half
of at least tolstagnation
iterations are compared for both, the
per-iteration best and per-iteration median function value.
import cma cma.CMAOptions('tol')
is a shortcut for cma.CMAOptions().match('tol') that returns all options that contain 'tol' in their name or description.
To set an option:
import cma opts = cma.CMAOptions() opts.set('tolfun', 1e-12) opts['tolx'] = 1e-11
See Also:
fmin`(), `CMAEvolutionStrategy
, _CMAParameters
|
|||
|
|||
|
|||
|
|||
new empty dictionary |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
|
|||
|
|||
|
|
|||
Inherited from |
|
|||
Inherited from |
|
return list of options that can be changed at any time (not only be initialized), however the list might not be entirely up to date. The string ' #v ' in the default value indicates a 'versatile' option that can be changed any time. |
return an CMAOptions instance, either with the default
options, if s is None, or with all options whose name or
description contains Returns: see above.
|
initialize one or several options. Arguments
DetailsOnly known keys are accepted. Known keys are in CMAOptions.defaults() |
set can assign versatile options from CMAOptions.versatile_options() with a new value, use init() for the others. Arguments
This method will be most probably used with the opts attribute of a CMAEvolutionStrategy instance. |
return the subset of those options that are settable at any time. Settable options are in versatile_options(), but the list might be incomplete. |
evaluate and return the value of option DetailsKeys that contain |
Evaluates and sets the specified option value in
environment DetailsKeys that contain 'filename' are not evaluated.
For |
loc .
See Also: eval() |
return all options that match, in the name or the description,
with string Example: cma.CMAOptions().match('verb') returns the verbosity options. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Mar 3 01:17:17 2015 | http://epydoc.sourceforge.net |