deephyper.problem.ForbiddenEqualsRelation#

class deephyper.problem.ForbiddenEqualsRelation#

Bases: ConfigSpace.forbidden.ForbiddenRelation

A ForbiddenEquals relation between two hyperparameters.

The ForbiddenEquals compares the values of two hyperparameters.

>>> from ConfigSpace import ConfigurationSpace, ForbiddenEqualsRelation
>>>
>>> cs = ConfigurationSpace({"a": [1, 2, 3], "b": [2, 5, 6]})
>>>
>>> forbidden_clause = ForbiddenEqualsRelation(cs['a'], cs['b'])
>>> cs.add_forbidden_clause(forbidden_clause)
Forbidden: a == b

Note

If the values of the both hyperparameters are not comparible (e.g. comparing int and str), a TypeError is raised. For OrdinalHyperparameters the actual values are used for comparison not their ordinal value.

Parameters
  • left (Hyperparameters) – left side of the comparison

  • right (Hyperparameters) – right side of the comparison

Methods

get_descendant_literal_clauses

is_forbidden

is_forbidden_vector

set_vector_idx

Attributes

hyperparameter

left

right

value

vector_id

vector_ids

vector_value