Skip to content

Commit afcab90

Browse files
committed
doc
1 parent 237977c commit afcab90

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

_doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"sphinx_issues",
1818
"matplotlib.sphinxext.plot_directive",
1919
"sphinx_runpython.blocdefs.sphinx_exref_extension",
20+
"sphinx_runpython.blocdefs.sphinx_faqref_extension",
2021
"sphinx_runpython.blocdefs.sphinx_mathdef_extension",
2122
"sphinx_runpython.docassert",
2223
"sphinx_runpython.epkg",

mlinsights/mlmodel/target_predictors.py

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,15 @@ class TransformedTargetRegressor2(BaseEstimator, RegressorMixin):
3030
Useful for applying a non-linear transformation in regression
3131
problems.
3232
33-
:param regressor: object, `default=LinearRegression()`
33+
Parameters
34+
----------
35+
36+
regressor : object, `default=LinearRegression()`
3437
Regressor object such as derived from ``RegressorMixin``. This
3538
regressor will automatically be cloned each time prior to fitting.
36-
:param transformer: str or object of type :class:`BaseReciprocalTransformer
37-
<mlinsights.mlmodel.sklearn_transform_inv.BaseReciprocalTransformer>`
38-
39-
Attributes:
4039
41-
* regressor_: object, fitted regressor.
42-
* transformer_: object, Transformer used in ``fit`` and ``predict``.
40+
transformer : str or object of type :class:`BaseReciprocalTransformer
41+
<mlinsights.mlmodel.sklearn_transform_inv.BaseReciprocalTransformer>`
4342
4443
Examples
4544
--------
@@ -59,7 +58,11 @@ class TransformedTargetRegressor2(BaseEstimator, RegressorMixin):
5958
print(tt.score(X, y))
6059
print(tt.regressor_.coef_)
6160
62-
See notebook :ref:`l-sklearn-transformed-target` for a more complete example.
61+
See example :ref:`l-sklearn-transformed-target` for a more complete example.
62+
63+
The class holds two attributes `regressor_`, the fitted regressor,
64+
`transformer_` transformer used in ``fit``, ``predict``,
65+
``decision_function``, ``predict_proba``.
6366
"""
6467

6568
def __init__(self, regressor=None, transformer=None):
@@ -135,19 +138,17 @@ class TransformedTargetClassifier2(BaseEstimator, ClassifierMixin):
135138
Useful for applying permutation transformation in classification
136139
problems.
137140
138-
:param classifier: object, default=LogisticRegression()
141+
Parameters
142+
----------
143+
144+
classifier : object, default=LogisticRegression()
139145
Classifier object such as derived from ``ClassifierMixin``. This
140146
classifier will automatically be cloned each time prior to fitting.
141-
:param transformer: str or object of type :class:`BaseReciprocalTransformer
147+
148+
transformer : str or object of type :class:`BaseReciprocalTransformer
142149
<mlinsights.mlmodel.sklearn_transform_inv.BaseReciprocalTransformer>`
143150
Transforms the features.
144151
145-
Attributes:
146-
147-
* classifier_ : object, Fitted classifier.
148-
* transformer_ : object Transformer used in ``fit``, ``predict``,
149-
``decision_function``, ``predict_proba``.
150-
151152
Examples:
152153
153154
.. runpython::
@@ -165,7 +166,11 @@ class TransformedTargetClassifier2(BaseEstimator, ClassifierMixin):
165166
print(tt.score(X, y))
166167
print(tt.classifier_.coef_)
167168
168-
See notebook :ref:`l-sklearn-transformed-target` for a more complete example.
169+
See example :ref:`l-sklearn-transformed-target` for a more complete example.
170+
171+
The class holds two attributes `classifier_`, the fitted classifier,
172+
`transformer_` transformer used in ``fit``, ``predict``,
173+
``decision_function``, ``predict_proba``.
169174
"""
170175

171176
def __init__(self, classifier=None, transformer=None):

0 commit comments

Comments
 (0)