Skip to content

Commit

Permalink
DOC: tweak docstrings for learner inspectors
Browse files Browse the repository at this point in the history
j-ittner committed Jul 11, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 4ee81f6 commit 118a8e3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/facet/inspection/_learner_inspector.py
Original file line number Diff line number Diff line change
@@ -61,10 +61,6 @@
),
replacement="\n\n",
)
@subsdoc(
pattern="Explain a model based on SHAP",
replacement="Explain a regressor or classifier based on SHAP",
)
@inheritdoc(match="""[see superclass]""")
class _BaseLearnerInspector(
ModelInspector[T_SupervisedLearner], Generic[T_SupervisedLearner], metaclass=ABCMeta
@@ -236,6 +232,10 @@ def _get_learner(model: T_SupervisedLearner) -> NativeSupervisedLearner:
pass


@subsdoc(
pattern=r"Explain a model",
replacement=r"Explain an :mod:`sklearndf` regressor or classifier",
)
@inheritdoc(match="""[see superclass]""")
class LearnerInspector(
_BaseLearnerInspector[T_SupervisedLearnerDF], Generic[T_SupervisedLearnerDF]
@@ -320,6 +320,10 @@ def _get_learner(model: T_SupervisedLearnerDF) -> SupervisedLearnerDF:
)


@subsdoc(
pattern=r"Explain a model",
replacement=r"Explain a native scikit-learn regressor or classifier",
)
@inheritdoc(match="""[see superclass]""")
class NativeLearnerInspector(
_BaseLearnerInspector[T_SupervisedLearner], Generic[T_SupervisedLearner]

0 comments on commit 118a8e3

Please sign in to comment.