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.
| Class | |
inheriting from the cma.CMAEvolutionStrategy class, by adding the property incumbent, the attributes objective_values and _last_offspring_f_values. |
| Class | |
Define a callable multiobjective function from single objective ones. Example: |
| Class | |
non-adaptive IPOP incrementing scheme. |
| Class | |
a callable that returns the result of a call of get_kernel. |
| Class | |
with hypervolume_improvement method based on a varying empirical front. |
| Class | |
Takes a list of ramp-up methods and a selection "criterion", |
| Class | |
Sofomore framework for multiobjective optimization, with the ask-and-tell interface. |
| Function | best |
create a kernel (solver) of TYPE CmaKernel by duplicating the kernel with best uncrowded hypervolume improvement. |
| Function | cma |
return factor times minimum tolx from non-dominated kernels. |
| Function | get |
Factory function that produces len(x_starts) instances of type cmaKernel. |
| Function | get |
return a list with one element of type CmaKernel. |
| Function | get |
return a list with one element of type CmaKernel. |
| Function | random |
create a kernel (solver) of TYPE CmaKernel with a random initial mean, or an initial mean given by the factory function x0_funct, and initial step-size sigma0. |
| Function | sort |
Example: |
| Function | sort |
Example: |
| Function | sort |
Example: |
| Function | sort |
Example: |
| Function | sort |
Used for the update order of a Sofomore instance. Example: |
| Variable | __author__ |
Undocumented |
| Variable | __license__ |
Undocumented |
| Variable | __version__ |
Undocumented |
| Variable | cma |
Undocumented |
| Class | _ |
A dictionary with two additional features. |
create a kernel (solver) of TYPE CmaKernel by duplicating the kernel with best uncrowded hypervolume improvement.
Parameters
- moes : TYPE Sofomore
- A multiobjective solver instance with cma-es (of TYPE CmaKernel) solvers.
- sigma_factor : TYPE int or float, optional
- A step size factor used in the initial step-size of the kernel returned. The default is 1.
- **kwargs :
- Other keyword arguments.
Returns
A kernel (solver) of TYPE CmaKernel derived from the kernel with largest contributing HV.
return factor times minimum tolx from non-dominated kernels.
Fallback to default tolx if the pareto_front_cut is empty.
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.
return a list with one element of type CmaKernel.
Parameters
moes: Sofomore, the instance for which this method is used as
restart option.
opts: dict, options passed (possibly with modifications) to
CmaKernel(cma.CMAEvolutionStrategy).
dynamic_tolx: Callable[[Sofomore, [factor]] -> tolx: float,
initialize the tolx option of CmaKernel depending on the
kernels of a Sofomore instance.
kwargs: dict, unused keyword arguments to allow for a generic call of
Sofomore.restart.
Details: this function picks best boundary kernels only with
probability of about 2 / number_of_kernels and uses
cma_kernel_default_options_dynamic_tolx to control the tolx option
of CmaKernel.
TODO: it may be better to pick best boundary kernels with at least, say, 5%. However from a practical perspective, boundary kernels are usually of lesser interest and pushing the boundary leads to more gaps at extremer (less interesting) regions(?) that will also be filled in the sequel.
return a list with one element of type CmaKernel.
Parameters
moes: Sofomore, the instance for which this method is used as
restart option.
x0_fct: callable, that returns an initial solution passed to
CmaKernel. By default uniform in [-5, 5].
opts: dict, options passed (possibly with modifications) to
the CmaKernel(cma.CMAEvolutionStrategy) instantiation call.
dynamic_tolx: Callable[[Sofomore, [factor]] -> tolx: float,
initialize the tolx option of CmaKernel depending on the
kernels of a Sofomore instance.
kwargs: dict, unused keyword arguments to allow for a generic call of
Sofomore.restart.
Details: this function mimics random_restart_kernel but uses
additionally cma_kernel_default_options_dynamic_tolx to control the
tolx option of CmaKernel.
create a kernel (solver) of TYPE CmaKernel with a random initial mean, or
an initial mean given by the factory function x0_funct, and initial step-size
sigma0.
Parameters
- moes : TYPE Sofomore
- A multiobjective solver instance with cma-es (of TYPE CmaKernel) solvers.
- x0_fct : TYPE function, optional
- A factory function that creates an initial mean. The default is None.
- sigma0 : TYPE float, optional
- Initial step-size of the returned kernel. The default is None.
- opts : TYPE dict, optional
- The returned kernel's options. The default is
None. - **kwargs :
- Other keyword arguments.
Returns
A kernel (solver) of TYPE CmaKernel.
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.
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.
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.
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.
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.