skfolio.utils.tools.check_estimator#

skfolio.utils.tools.check_estimator(estimator, default, check_type)[source]#
Check the estimator type and returns its cloned version it provided, otherwise

return the default estimator.

Parameters:
estimatorBaseEstimator, optional

Estimator.

defaultBaseEstimator, optional

Default estimator to return when estimator is None.

check_typeAny

Expected type of the estimator to check against.

Returns:
estimatorEstimator

The checked estimator or the default.