fatf.transparency.sklearn.tools.is_sklearn_model

fatf.transparency.sklearn.tools.is_sklearn_model(clf: Union[object, type]) → bool[source]

Checks whether a class instance or a class is a scikit-learn predictor.

New in version 0.0.2.

This is achieved by checking inheritance from sklearn.base.BaseEstimator.

Parameters
clfUnion[object, type]

A Python object (class instance) or a class to be checked.

Returns
is_valid_modelboolean

True if clf inherits from sklearn.base.BaseEstimator, False otherwise.