Source code for sklego.base
from sklearn.base import OutlierMixin
[docs]class ProbabilisticClassifierMeta(type):
def __instancecheck__(self, other):
return hasattr(other, "predict_proba")
[docs]class ClustererMeta(type):
def __instancecheck__(self, other):
return hasattr(other, "fit_predict")
[docs]class OutlierModelMeta(type):
def __instancecheck__(self, other):
return isinstance(other, OutlierMixin)