class documentation
class BinaryEvolutionPath(EvolutionPath):
Constructor: BinaryEvolutionPath(time_constant)
Undocumented
| Method | binary |
how many increments for one decrement in stationary state |
| Property | probability |
propability of path entries to be larger than one, |
| Property | raw |
return one of two possible values with expectation of zero. |
Inherited from EvolutionPath:
| Method | __init__ |
Undocumented |
| Property | path |
Undocumented |
Inherited from ExponentialSmoothing (via EvolutionPath):
| Method | __call__ |
Undocumented |
| Method | __getitem__ |
Undocumented |
| Instance Variable | count |
Undocumented |
| Instance Variable | normalizer |
Undocumented |
| Instance Variable | time |
Undocumented |
| Instance Variable | values |
Undocumented |
| Method | _init_ |
Undocumented |
propability of path entries to be larger than one,
given the input is sign(randn()). Check out:
n = int(1e4)
greater_than_one = []
ar_tc = [1.2, 1.5, 1.9, 2, 4, 8, 16, 32, 100]
for tc in ar_tc:
p = cma.optimization_tools.EvolutionPath(tc)
for i in range(int(10 * tc)):
p(np.sign(np.random.randn(n)))
# plot(*step_data(p.path))
greater_than_one += [(np.mean(p.path > 1) + np.mean(p.path < -1)) / 2]