deephyper.problem.ForbiddenAndConjunction#

class deephyper.problem.ForbiddenAndConjunction#

Bases: ConfigSpace.forbidden.AbstractForbiddenConjunction

A ForbiddenAndConjunction.

The ForbiddenAndConjunction combines forbidden-clauses, which allows to build powerful constraints.

>>> from ConfigSpace import (
...     ConfigurationSpace,
...     ForbiddenEqualsClause,
...     ForbiddenInClause,
...     ForbiddenAndConjunction
... )
>>>
>>> cs = ConfigurationSpace({"a": [1, 2, 3], "b": [2, 5, 6]})
>>>
>>> forbidden_clause_a = ForbiddenEqualsClause(cs["a"], 2)
>>> forbidden_clause_b = ForbiddenInClause(cs["b"], [2])
>>>
>>> forbidden_clause = ForbiddenAndConjunction(forbidden_clause_a, forbidden_clause_b)
>>>
>>> cs.add_forbidden_clause(forbidden_clause)
(Forbidden: a == 2 && Forbidden: b in {2})
Parameters

*args (list(Forbidden clauses)) – forbidden clauses, which should be combined

Methods

get_descendant_literal_clauses

is_forbidden

is_forbidden_vector

set_vector_idx

Attributes

components

hyperparameter

n_components

value

vector_id

vector_value