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.HyperCMAESSampler cotengra.hyperoptimizers.hyper_cmaes.CMAESOptLib Module Contents --------------- .. 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:class:: CMAESOptLib Bases: :py:obj:`cotengra.hyperoptimizers.hyper.HyperOptLib` Hyper-optimization using CMA-ES with per-method optimizers and a Lower Confidence Bound method selector. .. py:method:: setup(methods, space, optimizer=None, sigma=1.0, lr_adapt=True, method_exploration=1.0, method_temperature=1.0, exponential_param_power=None, **cmaes_opts) Initialize the optimizer state. :param methods: The list of contraction methods to optimize over. :type methods: list[str] :param space: The search space for each method. :type space: dict[str, dict[str, dict]] :param optimizer: The parent ``HyperOptimizer`` instance, for accessing attributes like ``max_repeats``. :type optimizer: HyperOptimizer, optional :param kwargs: Extra options specific to the optimizer library. .. py:method:: get_setting() Suggest the next setting to trial. :returns: **setting** -- Must contain at least ``{"method": str, "params": dict}``. May also include tokens for reporting. :rtype: dict .. py:method:: report_result(setting, trial, score) Report the result of a trial. :param setting: The setting dict returned by ``get_setting``. :type setting: dict :param trial: The trial result dict. :type trial: dict :param score: The scalar score for this trial. :type score: float