Skip to content

Commit

Permalink
fix sklearn links (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-bentley authored Jan 8, 2021
1 parent 263daa6 commit 1c5c5f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/sklearndf/_sklearndf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class EstimatorDF(FittableMixin[pd.DataFrame], metaclass=ABCMeta):
Provides enhanced support for data frames.
"""

#: Name for the series containing input feature names.
COL_FEATURE_IN = "feature_in"

def __new__(cls: Type["EstimatorDF"], *args, **kwargs) -> object:
Expand Down Expand Up @@ -213,6 +214,7 @@ class TransformerDF(EstimatorDF, TransformerMixin, metaclass=ABCMeta):
Provides enhanced support for data frames.
"""

#: Name for the series containing feature names after transform.
COL_FEATURE_OUT = "feature_out"

def __init__(self, *args, **kwargs) -> None:
Expand Down
8 changes: 5 additions & 3 deletions src/sklearndf/_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ def from_fitted(
) -> T_EstimatorWrapperDF:
"""
Make a new wrapped data frame estimator whose delegate is an estimator which
has already been fitted
has already been fitted.
:param estimator: the fitted estimator
:param features_in: the column names of X used for fitting the estimator
:param n_outputs: the number of outputs in y used for fitting the estimator
Expand Down Expand Up @@ -454,6 +455,7 @@ class _LearnerWrapperDF(
Base class for wrappers around a delegate learner.
"""

#: Name for the series containing model predictions.
COL_PREDICTION = "prediction"

# noinspection PyPep8Naming
Expand Down Expand Up @@ -973,9 +975,9 @@ def _update_class_docstring(
*tag_line,
(
f"""
.. note:: This class is a wrapper around class :class:{estimator_name}.
.. note:: This class is a wrapper around class :class:`{estimator_name}`.
It provides enhanced support for pandas data frames, and otherwise
replicates all parameters and behaviours of class :class:~{estimator_name}."""
replicates all parameters and behaviours of class :class:`~{estimator_name}`."""
),
*(base_doc_lines if INCLUDE_FULL_SKLEARN_DOCUMENTATION else []),
]
Expand Down
1 change: 1 addition & 0 deletions src/sklearndf/pipeline/_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class _PipelineWrapperDF(
_TransformerWrapperDF[Pipeline],
metaclass=ABCMeta,
):
#: Name for transformes in the pipeline that are passthrough.
PASSTHROUGH = "passthrough"

def _validate_delegate_estimator(self) -> None:
Expand Down

0 comments on commit 1c5c5f8

Please # to comment.