adapt.utils.check_estimator

adapt.utils.check_estimator(estimator=None, copy=True, name=None, display_name='estimator', task=None, force_copy=False)[source]

Check estimator.

Check that estimator is a sklearn BaseEstimator or a tensorflow Model.

Parameters
estimatorsklearn BaseEstimator or tensorflow Model

Estimator. If None a LinearRegression instance or a LogisticRegression instance is returned depending on the task argument.

copyboolean (default=False)

Whether to return a copy of the estimator or not. If cloning fail, a warning is raised.

display_name: str (default=”estimator”)

Name to display if an error or warning is raised

taskstr (default=None)

Task at hand. Possible value : (None, "reg", "class")

force_copyboolean (default=False)

If True, an error is raised if the cloning failed.