mlens.utils.checks module

ML-ENSEMBLE

author:Sebastian Flennerhag
copyright:2017
licence:MIT

Controls that an estimator was built as expected.

mlens.utils.checks.assert_correct_format(estimators, preprocessing)[source]

Initial check to assert layer can be constructed.

mlens.utils.checks.assert_valid_estimator(instance)[source]

Assert that an instance has a get_params and fit method.

mlens.utils.checks.check_ensemble_build(inst, attr='layers')[source]

Check that layers have been instantiated.

mlens.utils.checks.check_initialized(inst)[source]

Check if a ParallelProcessing instance is initialized properly.

mlens.utils.checks.check_is_fitted(estimator, attr)[source]

Check that ensemble has been fitted.

Parameters:
  • estimator (estimator instance) – ensemble instance to check.
  • attr (str) – attribute to assert existence of.