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

Name Description
sampling_method_name
Required
str

The name of the sampling method.

parameter_space
Required

A dictionary containing each parameter and its distribution.

properties

A dictionary with additional properties for the algorithm.

default value: None
supported_distributions
set[str]

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

default value: None
sampling_method_name
Required
str

The name of the sampling method.

parameter_space
Required

A dictionary containing each parameter and its distribution.

properties
Required

A dictionary with additional properties for the algorithm.

supported_distributions
Required
set[str]

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

distributions_validators

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.

default value: None

Methods

to_json

Return JSON representing the hyperparameter sampling object.

to_json

Return JSON representing the hyperparameter sampling object.

to_json()

Returns

Type Description
str

JSON formatted sampling policy.