cotengra.hyperoptimizers.hyper_cmaes ==================================== .. py:module:: cotengra.hyperoptimizers.hyper_cmaes .. autoapi-nested-parse:: Hyper parameter optimization using cmaes, as implemented by https://github.com/CyberAgentAILab/cmaes. Classes ------- .. autoapisummary:: cotengra.hyperoptimizers.hyper_cmaes.LCBOptimizer cotengra.hyperoptimizers.hyper_cmaes.Param cotengra.hyperoptimizers.hyper_cmaes.ParamFloat cotengra.hyperoptimizers.hyper_cmaes.ParamFloatExp cotengra.hyperoptimizers.hyper_cmaes.ParamInt cotengra.hyperoptimizers.hyper_cmaes.ParamString cotengra.hyperoptimizers.hyper_cmaes.ParamBool cotengra.hyperoptimizers.hyper_cmaes.HyperCMAESSampler Functions --------- .. autoapisummary:: cotengra.hyperoptimizers.hyper_cmaes.cmaes_init_optimizers cotengra.hyperoptimizers.hyper_cmaes.cmaes_get_setting cotengra.hyperoptimizers.hyper_cmaes.cmaes_report_result Module Contents --------------- .. py:class:: LCBOptimizer(options, exploration=1.0, temperature=1.0, seed=None) Lower Confidence Bound Optimizer. This optimizer selects the option with the lowest lower confidence bound. .. py:attribute:: options .. py:attribute:: index .. py:attribute:: nopt .. py:attribute:: counts .. py:attribute:: values .. py:attribute:: total :value: 0 .. py:attribute:: exploration :value: 1.0 .. py:attribute:: temperature :value: 1.0 .. py:attribute:: rng .. py:method:: ask() Suggest an option based on the lower confidence bound. .. py:method:: tell(option, score) .. py:class:: Param(name) A basic parameter class for mapping various types of parameters to and from uniform optimization space of [-1, 1]. .. py:attribute:: name .. py:attribute:: size :value: 1 .. py:method:: get_raw_bounds() :abstractmethod: .. py:method:: convert_raw(vi) :abstractmethod: .. py:class:: ParamFloat(min, max, **kwargs) Bases: :py:obj:`Param` A basic parameter class for mapping various types of parameters to and from uniform optimization space of [-1, 1]. .. py:attribute:: min .. py:attribute:: max .. py:method:: convert_raw(x) .. py:class:: ParamFloatExp(min, max, power=0.5, **kwargs) Bases: :py:obj:`ParamFloat` An exponentially distributed (i.e. uniform in logspace) parameter. .. py:attribute:: power :value: 0.5 .. py:method:: convert_raw(x) .. py:class:: ParamInt(min, max, **kwargs) Bases: :py:obj:`Param` A basic parameter class for mapping various types of parameters to and from uniform optimization space of [-1, 1]. .. py:attribute:: min .. py:attribute:: max .. py:method:: convert_raw(x) .. py:class:: ParamString(options, name) Bases: :py:obj:`Param` A basic parameter class for mapping various types of parameters to and from uniform optimization space of [-1, 1]. .. py:attribute:: options .. py:attribute:: size .. py:attribute:: name .. py:method:: convert_raw(x) .. py:class:: ParamBool(name) Bases: :py:obj:`Param` A basic parameter class for mapping various types of parameters to and from uniform optimization space of [-1, 1]. .. py:attribute:: size :value: 2 .. py:attribute:: name .. py:method:: convert_raw(x) .. py:class:: HyperCMAESSampler(space, sigma=1.0, lr_adapt=True, separable=False, exponential_param_power=None, **kwargs) .. py:attribute:: params :value: [] .. py:attribute:: opt .. py:attribute:: _trial_counter :value: 0 .. py:attribute:: _trial_store .. py:attribute:: _batch :value: [] .. py:method:: ask() .. py:method:: tell(trial_number, value) .. py:function:: cmaes_init_optimizers(self, methods, space, sigma=1.0, lr_adapt=True, method_exploration=1.0, method_temperature=1.0, exponential_param_power=None, **cmaes_opts) .. py:function:: cmaes_get_setting(self) .. py:function:: cmaes_report_result(self, settings, trial, score)