ultraopt.benchmarks package

Submodules

ultraopt.benchmarks.synthetic_functions module

class ultraopt.benchmarks.synthetic_functions.MultiFidelityRosenbrock10D(rng=None)

基类:ultraopt.benchmarks.synthetic_functions.MultiFidelityRosenbrock2D

Interface for benchmarks. A benchmark contains of two building blocks, the target function and the configuration space. Furthermore it can contain additional benchmark-specific information such as the location and the function value of the global optima. New benchmarks should be derived from this base class or one of its child classes.

static get_configuration_space()

Defines the configuration space for each benchmark. :returns: A valid configuration space for the benchmark’s parameters :rtype: ConfigSpace.ConfigurationSpace

static get_meta_information()

Provides some meta information about the benchmark. :returns: some human-readable information :rtype: dict

class ultraopt.benchmarks.synthetic_functions.MultiFidelityRosenbrock20D(rng=None)

基类:ultraopt.benchmarks.synthetic_functions.MultiFidelityRosenbrock2D

Interface for benchmarks. A benchmark contains of two building blocks, the target function and the configuration space. Furthermore it can contain additional benchmark-specific information such as the location and the function value of the global optima. New benchmarks should be derived from this base class or one of its child classes.

static get_configuration_space()

Defines the configuration space for each benchmark. :returns: A valid configuration space for the benchmark’s parameters :rtype: ConfigSpace.ConfigurationSpace

static get_meta_information()

Provides some meta information about the benchmark. :returns: some human-readable information :rtype: dict

class ultraopt.benchmarks.synthetic_functions.MultiFidelityRosenbrock2D(rng=None)[源代码]

基类:ultraopt.benchmarks.synthetic_functions.Rosenbrock2D

Interface for benchmarks. A benchmark contains of two building blocks, the target function and the configuration space. Furthermore it can contain additional benchmark-specific information such as the location and the function value of the global optima. New benchmarks should be derived from this base class or one of its child classes.

static get_meta_information()[源代码]

Provides some meta information about the benchmark. :returns: some human-readable information :rtype: dict

objective_function(configuration, **kwargs)

Objective function. Override this function to provide your benchmark function. This function will be called by one of the evaluate functions. For flexibility you have to return a dictionary with the only mandatory key being function_value, the objective function value for the configuration which was passed. By convention, all benchmarks are minimization problems. :param configuration: :type configuration: dict-like

返回

Must contain at least the key function_value.

返回类型

dict

objective_function_test(x, **kwargs)[源代码]

If there is a different objective function for offline testing, e.g testing a machine learning on a hold extra test set instead on a validation set override this function here. :param configuration: :type configuration: dict-like

返回

Must contain at least the key function_value.

返回类型

dict

class ultraopt.benchmarks.synthetic_functions.MultiFidelityRosenbrock5D(rng=None)

基类:ultraopt.benchmarks.synthetic_functions.MultiFidelityRosenbrock2D

Interface for benchmarks. A benchmark contains of two building blocks, the target function and the configuration space. Furthermore it can contain additional benchmark-specific information such as the location and the function value of the global optima. New benchmarks should be derived from this base class or one of its child classes.

static get_configuration_space()

Defines the configuration space for each benchmark. :returns: A valid configuration space for the benchmark’s parameters :rtype: ConfigSpace.ConfigurationSpace

static get_meta_information()

Provides some meta information about the benchmark. :returns: some human-readable information :rtype: dict

class ultraopt.benchmarks.synthetic_functions.Rosenbrock10D(rng=None)

基类:ultraopt.benchmarks.synthetic_functions.Rosenbrock2D

Interface for benchmarks. A benchmark contains of two building blocks, the target function and the configuration space. Furthermore it can contain additional benchmark-specific information such as the location and the function value of the global optima. New benchmarks should be derived from this base class or one of its child classes.

static get_configuration_space()

Defines the configuration space for each benchmark. :returns: A valid configuration space for the benchmark’s parameters :rtype: ConfigSpace.ConfigurationSpace

static get_meta_information()

Provides some meta information about the benchmark. :returns: some human-readable information :rtype: dict

class ultraopt.benchmarks.synthetic_functions.Rosenbrock20D(rng=None)

基类:ultraopt.benchmarks.synthetic_functions.Rosenbrock2D

Interface for benchmarks. A benchmark contains of two building blocks, the target function and the configuration space. Furthermore it can contain additional benchmark-specific information such as the location and the function value of the global optima. New benchmarks should be derived from this base class or one of its child classes.

static get_configuration_space()

Defines the configuration space for each benchmark. :returns: A valid configuration space for the benchmark’s parameters :rtype: ConfigSpace.ConfigurationSpace

static get_meta_information()

Provides some meta information about the benchmark. :returns: some human-readable information :rtype: dict

class ultraopt.benchmarks.synthetic_functions.Rosenbrock2D(rng=None)[源代码]

基类:ultraopt.benchmarks.AbstractBenchmark

Interface for benchmarks. A benchmark contains of two building blocks, the target function and the configuration space. Furthermore it can contain additional benchmark-specific information such as the location and the function value of the global optima. New benchmarks should be derived from this base class or one of its child classes.

static get_configuration_space()[源代码]

Defines the configuration space for each benchmark. :returns: A valid configuration space for the benchmark’s parameters :rtype: ConfigSpace.ConfigurationSpace

static get_meta_information()[源代码]

Provides some meta information about the benchmark. :returns: some human-readable information :rtype: dict

objective_function(configuration, **kwargs)

Objective function. Override this function to provide your benchmark function. This function will be called by one of the evaluate functions. For flexibility you have to return a dictionary with the only mandatory key being function_value, the objective function value for the configuration which was passed. By convention, all benchmarks are minimization problems. :param configuration: :type configuration: dict-like

返回

Must contain at least the key function_value.

返回类型

dict

objective_function_test(x, **kwargs)[源代码]

If there is a different objective function for offline testing, e.g testing a machine learning on a hold extra test set instead on a validation set override this function here. :param configuration: :type configuration: dict-like

返回

Must contain at least the key function_value.

返回类型

dict

class ultraopt.benchmarks.synthetic_functions.Rosenbrock5D(rng=None)

基类:ultraopt.benchmarks.synthetic_functions.Rosenbrock2D

Interface for benchmarks. A benchmark contains of two building blocks, the target function and the configuration space. Furthermore it can contain additional benchmark-specific information such as the location and the function value of the global optima. New benchmarks should be derived from this base class or one of its child classes.

static get_configuration_space()

Defines the configuration space for each benchmark. :returns: A valid configuration space for the benchmark’s parameters :rtype: ConfigSpace.ConfigurationSpace

static get_meta_information()

Provides some meta information about the benchmark. :returns: some human-readable information :rtype: dict

Module contents

class ultraopt.benchmarks.AbstractBenchmark(rng=None)[源代码]

基类:object

Interface for benchmarks. A benchmark contains of two building blocks, the target function and the configuration space. Furthermore it can contain additional benchmark-specific information such as the location and the function value of the global optima. New benchmarks should be derived from this base class or one of its child classes.

abstract static get_configuration_space()[源代码]

Defines the configuration space for each benchmark. :returns: A valid configuration space for the benchmark’s parameters :rtype: ConfigSpace.ConfigurationSpace

abstract static get_meta_information()[源代码]

Provides some meta information about the benchmark. :returns: some human-readable information :rtype: dict

abstract objective_function(configuration, **kwargs)[源代码]

Objective function. Override this function to provide your benchmark function. This function will be called by one of the evaluate functions. For flexibility you have to return a dictionary with the only mandatory key being function_value, the objective function value for the configuration which was passed. By convention, all benchmarks are minimization problems. :param configuration: :type configuration: dict-like

返回

Must contain at least the key function_value.

返回类型

dict

abstract objective_function_test(configuration, **kwargs)[源代码]

If there is a different objective function for offline testing, e.g testing a machine learning on a hold extra test set instead on a validation set override this function here. :param configuration: :type configuration: dict-like

返回

Must contain at least the key function_value.

返回类型

dict

test(n_runs=5, *args, **kwargs)[源代码]

Draws some random configuration and call objective_fucntion(_test). :param n_runs: number of random configurations to draw and evaluate :type n_runs: int

ultraopt.benchmarks.create_rng(rng)[源代码]

helper to create rng from RandomState or int :param rng: int or RandomState :return: RandomState

ultraopt.benchmarks.get_rng(rng=None, self_rng=None)[源代码]

helper function to obtain RandomState. returns RandomState created from rng if rng then return RandomState created from rng if rng is None returns self_rng if self_rng and rng is None return random RandomState

参数
  • rng – int or RandomState

  • self_rng – RandomState

返回

RandomState