deephyper.problem.OrdinalHyperparameter

deephyper.problem.OrdinalHyperparameter

class deephyper.problem.OrdinalHyperparameter

Bases: ConfigSpace.hyperparameters.Hyperparameter

Methods

allow_greater_less_comparison

check_default

check if given default value is represented in the sequence.

check_order

check whether value1 is smaller than value2.

compare

compare_vector

get_neighbors

Return the neighbors of a given value.

get_num_neighbors

return the number of existing neighbors in the sequence

get_order

return the seuence position/order of a certain value from the sequence

get_seq_order

return the ordinal sequence as numeric sequence (according to the the ordering) from 1 to length of our sequence.

get_value

return the sequence value of a given order/position

has_neighbors

check if there are neighbors or we’re only dealing with an one-element sequence

is_legal

check if a certain value is represented in the sequence

is_legal_vector

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

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

num_elements

sequence

check_default()

check if given default value is represented in the sequence. If there’s no default value we simply choose the first element in our sequence as default.

check_order()

check whether value1 is smaller than value2.

get_neighbors()

Return the neighbors of a given value. Value must be in vector form. Ordinal name will not work.

get_num_neighbors()

return the number of existing neighbors in the sequence

get_order()

return the seuence position/order of a certain value from the sequence

get_seq_order()

return the ordinal sequence as numeric sequence (according to the the ordering) from 1 to length of our sequence.

get_value()

return the sequence value of a given order/position

has_neighbors()

check if there are neighbors or we’re only dealing with an one-element sequence

check if a certain value is represented in the sequence

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

rvs()

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