diff --git a/src/facet/inspection/_explainer.py b/src/facet/inspection/_explainer.py index 9de2b9e57..cadcf538d 100644 --- a/src/facet/inspection/_explainer.py +++ b/src/facet/inspection/_explainer.py @@ -79,7 +79,7 @@ def make_explainer( """ Construct a new :class:`~shap.Explainer` to compute shap values. - :param model: learner for which to compute shap values + :param model: fitted learner for which to compute shap values :param data: background dataset (optional) :return: the new explainer object """ @@ -147,13 +147,7 @@ def uses_background_dataset(self) -> bool: def make_explainer( self, model: LearnerDF, data: Optional[pd.DataFrame] = None ) -> Explainer: - """ - Construct a new :class:`~shap.TreeExplainer` to compute shap values. - - :param model: learner for which to compute shap values - :param data: background dataset (optional) - :return: the new explainer object - """ + """[see superclass]""" self._validate_background_dataset(data=data) @@ -176,7 +170,7 @@ def make_explainer( return explainer -# @inheritdoc(match="[see superclass]") +@inheritdoc(match="[see superclass]") class KernelExplainerFactory(ExplainerFactory): """ A factory constructing class:`~shap.KernelExplainer` objects. @@ -219,13 +213,7 @@ def uses_background_dataset(self) -> bool: return True def make_explainer(self, model: LearnerDF, data: pd.DataFrame) -> Explainer: - """ - Construct a new :class:`~shap.KernelExplainer` to compute shap values. - - :param model: learner for which to compute shap values - :param data: background dataset - :return: the new explainer object - """ + """[see superclass]""" self._validate_background_dataset(data=data) diff --git a/src/facet/selection/_selection.py b/src/facet/selection/_selection.py index 5cd52e473..d1988e415 100644 --- a/src/facet/selection/_selection.py +++ b/src/facet/selection/_selection.py @@ -246,7 +246,7 @@ def __init__( :param scoring: a scorer to use when doing CV within GridSearch, defaults to \ ``None`` :param ranking_scorer: a function to calculate a scalar score for every \ - crossfit, taking a :class:`.CrossfitScore` and returning a float. \ + crossfit, taking a :class:`.CrossfitScores` and returning a float. \ The resulting score is used to rank all crossfits (highest score is best). \ Defaults to :meth:`.default_ranking_scorer`, calculating \ `mean(scores) - 2 * std(scores)`. diff --git a/src/facet/validation/_validation.py b/src/facet/validation/_validation.py index 56f2510f4..ed30dee7f 100644 --- a/src/facet/validation/_validation.py +++ b/src/facet/validation/_validation.py @@ -81,7 +81,7 @@ def split( :param X: features :param y: target :param groups: not used - :return a generator yielding `(train, test)` tuples where train and test are \ + :return: a generator yielding `(train, test)` tuples where train and test are \ numpy arrays with train/test indices """ @@ -302,7 +302,7 @@ def split( :param X: features :param y: target :param groups: not used - :return a generator yielding `(train, test)` tuples where train and test are \ + :return: a generator yielding `(train, test)` tuples where train and test are \ numpy arrays with train/test indices """ indices = np.arange(len(X))