HyperParameterSampling Class

Abstract base class for all hyperparameter sampling algorithms.

This class encapsulates the hyperparameter space, the sampling method, and additional properties for derived sampling classes: BayesianParameterSampling, GridParameterSampling, and RandomParameterSampling.

Initialize HyperParameterSampling.

Inheritance
HyperParameterSampling

Constructor

HyperParameterSampling(sampling_method_name, parameter_space, properties=None, supported_distributions=None, distributions_validators=None)

Parameters

sampling_method_name
str
Required

The name of the sampling method.

parameter_space
dict
Required

A dictionary containing each parameter and its distribution.

properties
dict
default value: None

A dictionary with additional properties for the algorithm.

supported_distributions
set[str]
default value: None

A list of the supported distribution methods. The default None indicates all distributions are supported as described in module parameter_expressions.

sampling_method_name
str
Required

The name of the sampling method.

parameter_space
dict
Required

A dictionary containing each parameter and its distribution.

properties
dict
Required

A dictionary with additional properties for the algorithm.

supported_distributions
set[str]
Required

A list of the supported distribution methods. The default of None indicates all distributions are supported as described in module parameter_expressions.

distributions_validators
dict
default value: None

A dictionary that maps a distribution name to a function that validates if it is a valid distribution for the sampling method used. The default None indicates that no particular validators are needed.

Methods

to_json

Return JSON representing the hyperparameter sampling object.

to_json

Return JSON representing the hyperparameter sampling object.

to_json()

Returns

JSON formatted sampling policy.

Return type

str