This is documentation for an old release of Scikit-learn (version 0.20). Try the latest stable release (version 1.6) or development (unstable) versions.

sklearn.base.is_regressor

sklearn.base.is_regressor(estimator)[source]

Returns True if the given estimator is (probably) a regressor.

Parameters:
estimator : object

Estimator object to test.

Returns:
out : bool

True if estimator is a regressor and False otherwise.