baybe.constraints.utils.is_cardinality_fulfilled¶
- baybe.constraints.utils.is_cardinality_fulfilled(df: DataFrame, subspace_continuous: SubspaceContinuous, *, check_minimum: bool = True, check_maximum: bool = True)[source]¶
Validate cardinality constraints in a dataframe of parameter configurations.
- Parameters:
df (
DataFrame
) – The dataframe to be checked.subspace_continuous (
SubspaceContinuous
) – The subspace spanned by the considered parameters.check_minimum (
bool
) – IfTrue
, minimum cardinality constraints are validated.check_maximum (
bool
) – IfTrue
, maximum cardinality constraints are validated.
- Return type:
- Returns:
True
if all cardinality constraints are fulfilled,False
otherwise.