ddl.utils.has_method

ddl.utils.has_method(est, method_name, warn=True)[source]

Check if an estimator has a method and possibly warn if not.

Parameters:
est : estimator

Estimator to check.

method_name : str

Method to check.

warn : bool

Whether to warn if the method is not found.

Returns:
has_method : bool

Whether the estimator has the specified method.