wildboar.utils.estimator_checks#

Module Contents#

Functions#

check_consistent_estimator_params(name, estimator)

check_estimator(estimator[, generate_only, ignore, ...])

Check if estimator adheres to scikit-learn (and wildboar) conventions.

check_force_n_dims(name, estimator)

check_force_n_dims_raises(name, estimator)

check_sample_weights_invariance_samples_order(name, ...)

wildboar.utils.estimator_checks.check_consistent_estimator_params(name, estimator)[source]#
wildboar.utils.estimator_checks.check_estimator(estimator, generate_only=False, ignore=None, skip_scikit=False)[source]#

Check if estimator adheres to scikit-learn (and wildboar) conventions.

This method delegates to check_estimator in scikit-learn but monkey-patches the estimator with tags to skip some tests related to performance.

We also add a new parameter to allow for silently ignoring some scikit-learn tests.

Finally, we also add a suite of specific wildboar-tests tailored towards time series classifiers, regressors and transformers.

Parameters:
  • estimator (estimator object) – Estimator instance to check.

  • generate_only (bool, default=False) – When False, checks are evaluated when check_estimator is called. When True, check_estimator returns a generator that yields (estimator, check) tuples. The check is run by calling check(estimator).

  • ignore (list, optional) – Ignore the checks in the list.

  • skip_scikit (bool, optional) – Skip all scikit-learn tests.

Returns:

checks_generator – Generator that yields (estimator, check) tuples. Returned when generate_only=True.

Return type:

generator

wildboar.utils.estimator_checks.check_force_n_dims(name, estimator)[source]#
wildboar.utils.estimator_checks.check_force_n_dims_raises(name, estimator)[source]#
wildboar.utils.estimator_checks.check_sample_weights_invariance_samples_order(name, estimator_orig, kind='ones')[source]#