baybe.utils.validation.validate_target_input

baybe.utils.validation.validate_target_input(data: DataFrame, targets: Iterable[Target])[source]

Validate input dataframe columns corresponding to targets.

Parameters:
  • data (DataFrame) – The input dataframe to be validated.

  • targets (Iterable[Target]) – The allowed targets.

Raises:
  • ValueError – If the data is empty.

  • ValueError – If the data misses columns for a target.

  • TypeError – If any numerical target data contain non-numeric values.

  • ValueError – If any binary target data contain values not part of the targets’ allowed values or NaN.

Return type:

None