deephyper.problem.ForbiddenEqualsClause

deephyper.problem.ForbiddenEqualsClause

class deephyper.problem.ForbiddenEqualsClause

Bases: ConfigSpace.forbidden.SingleValueForbiddenClause

A ForbiddenEqualsClause

It forbids a value from the value range of a hyperparameter to be equal to value.

Example

>>> cs = CS.ConfigurationSpace()
>>> a = CSH.CategoricalHyperparameter('a', [1,2,3])
>>> cs.add_hyperparameters([a])
[a, Type: Categorical, Choices: {1, 2, 3}, Default: 1]

It forbids the value 2 for the hyperparameter a

>>> forbidden_clause_a = CS.ForbiddenEqualsClause(a, 2)
>>> cs.add_forbidden_clause(forbidden_clause_a)
Forbidden: a == 2
Parameters
  • hyperparameter (Hyperparameters) – Methods on which a restriction will be made

  • value (Any) – forbidden value

Methods

get_descendant_literal_clauses

is_forbidden

is_forbidden_vector

set_vector_idx

Attributes

hyperparameter

value

vector_id

vector_value