deephyper.problem.ForbiddenGreaterThanRelation#

class deephyper.problem.ForbiddenGreaterThanRelation#

Bases: ConfigSpace.forbidden.ForbiddenRelation

A ForbiddenGreaterThan relation between two hyperparameters.

The ForbiddenGreaterThan compares the values of two hyperparameters.

>>> from ConfigSpace import ConfigurationSpace, ForbiddenGreaterThanRelation
>>>
>>> cs = ConfigurationSpace({"a": [1, 2, 3], "b": [2, 5, 6]})
>>> forbidden_clause = ForbiddenGreaterThanRelation(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