diff --git a/sklearn/base.py b/sklearn/base.py index 8de001f06b9ba..5071bdec85031 100644 --- a/sklearn/base.py +++ b/sklearn/base.py @@ -461,7 +461,11 @@ def fit_transform(self, X, y=None, **fit_params): ############################################################################### class MetaEstimatorMixin(object): """Mixin class for all meta estimators in scikit-learn.""" - # this is just a tag for the moment + + @property + def _pairwise(self): + # Indicate if the wrapped estimator is one using a precomputed Gram matrix + return getattr(self.estimator, "_pairwise", False) ###############################################################################