Package comocma :: Module como
[hide private]
[frames] | no frames]

Module como

source code


This module contains the implementation of the Multiobjective framework called
Sofomore, and its instantiation with cma-es to obtain COMO-CMA-ES, defined in 
the paper [Toure, Cheikh, et al. "Uncrowded Hypervolume Improvement: 
        COMO-CMA-ES and the Sofomore framework." 
        GECCO'19-Genetic and Evolutionary Computation Conference. 2019.].

Only the bi-objective framework is functional and has been thoroughly tested.


Version: 0.5.1

Author: Cheikh Toure and Nikolaus Hansen

License: BSD 3-clause

Classes [hide private]
  Sofomore
Sofomore framework for multiobjective optimization, with the ask-and-tell interface.
  IndicatorFront
with `hypervolume_improvement` method based on a varying empirical front.
  CmaKernel
inheriting from the `cma.CMAEvolutionStrategy` class, by adding the property `incumbent`, the attributes `objective_values` and `_last_offspring_f_values`.
  FitFun
Define a callable multiobjective function from single objective ones.
Functions [hide private]
 
get_cmas(x_starts, sigma_starts, inopts=None, number_created_kernels=0)
Factory function that produces `len(x_starts)` instances of type `cmaKernel`.
source code
 
sort_random(i)
Used for the update order of a Sofomore instance.
source code
 
sort_increasing(i)
Example:
source code
 
sort_decreasing(i)
Example:
source code
 
sort_even_odds(i)
Example:
source code
 
sort_odds_even(i)
Example:
source code
Variables [hide private]
  cma_kernel_default_options_replacements = {u'conditioncov_alle...
  __package__ = 'comocma'
Function Details [hide private]

get_cmas(x_starts, sigma_starts, inopts=None, number_created_kernels=0)

source code 

Factory function that produces `len(x_starts)` instances of type `cmaKernel`.

Parameters
----------
x_starts : TYPE list or list of lists or list of or ndarrays or ndarray
    The initial means of the returned cmas.
sigma_starts : TYPE float or list of floats
    The initial step-sizes of the returned cmas.
inopts : TYPE dict or list of dicts, optional
    The cmas' options.
number_created_kernels : TYPE int, optional
    Used as the starting index for the returned cma's names.
    The values of the options' key 'verb_filenameprefix' rely upon this
    argument `number_created_kernels`.

Returns
-------
A list of `CmaKernel` instances.

Example::
    >>> import comocma
    >>> dimension = 10
    >>> sigma0 = 0.5
    >>> num_kernels = 11
    >>> cma_opts = {'tolx': 10**-4, 'popsize': 32}
    >>> list_of_solvers = comocma.get_cmas(num_kernels * [dimension * [0]], sigma0, cma_opts) 
    
    produce `num_kernels` cma instances.

sort_random(i)

source code 

Used for the update order of a Sofomore instance. Example:

   moes = Sofomore(list_of_instances, reference_point, {'update_order': sort_random})

randomly picks the kernels to update in the `tell` method of Sofomore.

sort_increasing(i)

source code 

Example:

   moes = Sofomore(list_of_instances, reference_point, {'update_order': sort_increasing})

updates respectively `self[0]`, `self[1]`, ..., `self[-1]` in the `tell` method of Sofomore.

sort_decreasing(i)

source code 

Example:

   moes = Sofomore(list_of_instances, reference_point, {'update_order': sort_decreasing})

updates respectively `self[-1]`, `self[-2]`, ..., `self[0]` in the `tell` method of Sofomore.

sort_even_odds(i)

source code 

Example:

   moes = Sofomore(list_of_instances, reference_point, {'update_order': sort_even_odds})

pick the kernels with even indices before the kernels with odd indices in the `tell` method of Sofomore.

sort_odds_even(i)

source code 

Example:

   moes = Sofomore(list_of_instances, reference_point, {'update_order': sort_odds_even})

pick the kernels with odd indices before the kernels with even indices in the `tell` method of Sofomore.


Variables Details [hide private]

cma_kernel_default_options_replacements

Value:
{u'conditioncov_alleviate': [inf, inf],
 u'tolfun': 0,
 u'tolfunhist': 0,
 u'tolfunrel': 0,
 u'tolstagnation': 1e+23,
 u'tolx': 0.0001,
 u'verbose': -1}