deephyper.problem.Constant#

class deephyper.problem.Constant#

Bases: Hyperparameter

Methods

compare_vector

get_max_density

get_neighbors

get_num_neighbors

get_size

has_neighbors

is_legal

is_legal_vector

Check whether the given value is a legal value for the vector representation of this hyperparameter.

pdf

Computes the probability density function of the parameter in the original parameter space (the one specified by the user).

rvs

scipy compatibility wrapper for _sample, allowing the hyperparameter to be used in sklearn API hyperparameter searchers, eg.

sample

Attributes

default_value

meta

name

normalized_default_value

value

Check whether the given value is a legal value for the vector representation of this hyperparameter.

Parameters:

value – the vector value to check

Returns:

True if the given value is a legal vector value, otherwise False

Return type:

bool

pdf()#

Computes the probability density function of the parameter in the original parameter space (the one specified by the user). For each hyperparameter type, there is also a method _pdf which operates on the transformed (and possibly normalized) parameter space. Only legal values return a positive probability density, otherwise zero.

Parameters:

vector (np.ndarray) – the (N, ) vector of inputs for which the probability density function is to be computed.

Returns:

Probability density values of the input vector

Return type:

np.ndarray(N, )

rvs()#

scipy compatibility wrapper for _sample, allowing the hyperparameter to be used in sklearn API hyperparameter searchers, eg. GridSearchCV.