deephyper.problem.ForbiddenAndConjunction
deephyper.problem.ForbiddenAndConjunction#
-
class
deephyper.problem.
ForbiddenAndConjunction
# Bases:
ConfigSpace.forbidden.AbstractForbiddenConjunction
A ForbiddenAndConjunction.
The ForbiddenAndConjunction combines forbidden-clauses, which allows to build powerful constraints.
Example
>>> cs = CS.ConfigurationSpace(seed=1) >>> a = CSH.CategoricalHyperparameter('a', [1,2,3]) >>> b = CSH.CategoricalHyperparameter('b', [2,5,6]) >>> cs.add_hyperparameters([a, b]) [a, Type: Categorical, Choices: {1, 2, 3}, Default: 1, b, Type: ...]
>>> forbidden_clause_a = CS.ForbiddenEqualsClause(a, 2) >>> forbidden_clause_b = CS.ForbiddenInClause(b, [2]) >>> forbidden_clause = CS.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