deephyper.problem.ForbiddenLessThanRelation
deephyper.problem.ForbiddenLessThanRelation#
-
class
deephyper.problem.
ForbiddenLessThanRelation
# Bases:
ConfigSpace.forbidden.ForbiddenRelation
A ForbiddenLessThan relation between two hyperparameters.
The ForbiddenLessThan compares the values of two hyperparameters.
>>> from ConfigSpace import ConfigurationSpace, ForbiddenLessThanRelation >>> >>> cs = ConfigurationSpace({"a": [1, 2, 3], "b": [2, 5, 6]}) >>> >>> forbidden_clause = ForbiddenLessThanRelation(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