Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the What you really need to know section for the big picture.

julearn.prepare.check_consistency

julearn.prepare.check_consistency(y, cv, groups, problem_type)

Check the consistency of the parameters/input.

Parameters:
  • y (Series) – The target variable.

  • cv (int | BaseCrossValidator | _RepeatedSplits | BaseShuffleSplit | Iterable | _JulearnFinalModelCV) – The cross-validator to use.

  • groups (Series | None) – The grouping variable.

  • problem_type (str) – The problem type. Can be “classification” or “regression”.

Returns:

True if the groups variable is needed for the CV scheme, False otherwise.

Raises:

ValueError – If there is any inconsistency between the parameters and the data.

Warns:
RuntimeWarning

If there might be an inconsistency between the parameters and the data but the pipeline can still run.