8000 DOC Ensure StackingClassifier pass numpydoc validation (#21135) · glemaitre/scikit-learn@9f50ed7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f50ed7

Browse files
EricEllwangerfrellwanglemaitre
committed
DOC Ensure StackingClassifier pass numpydoc validation (scikit-learn#21135)
Co-authored-by: frellwan <frellwan@hotmail.com> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent 9ce8b5f commit 9f50ed7

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

maint_tools/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"SpectralCoclustering",
3838
"SpectralEmbedding",
3939
"SplineTransformer",
40-
"StackingClassifier",
4140
"StackingRegressor",
4241
"TransformedTargetRegressor",
4342
]

sklearn/ensemble/_stacking.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,10 @@ class StackingClassifier(ClassifierMixin, _BaseStacking):
387387
stack_method_ : list of str
388388
The method used by each base estimator.
389389
390+
See Also
391+
--------
392+
StackingRegressor : Stack of estimators with a final regressor.
393+
390394
Notes
391395
-----
392396
When `predict_proba` is used by each estimator (i.e. most of the time for
@@ -424,7 +428,6 @@ class StackingClassifier(ClassifierMixin, _BaseStacking):
424428
... )
425429
>>> clf.fit(X_train, y_train).score(X_test, y_test)
426430
0.9...
427-
428431
"""
429432

430433
def __init__(
@@ -477,6 +480,7 @@ def fit(self, X, y, sample_weight=None):
477480
Returns
478481
-------
479482
self : object
483+
Returns a fitted instance of estimator.
480484
"""
481485
check_classification_targets(y)
482486
self._le = LabelEncoder().fit(y)
@@ -509,8 +513,7 @@ def predict(self, X, **predict_params):
509513

510514
@if_delegate_has_method(delegate="final_estimator_")
511515
def predict_proba(self, X):
512-
"""Predict class probabilities for X using
513-
`final_estimator_.predict_proba`.
516+
"""Predict class probabilities for `X` using the final estimator.
514517
515518
Parameters
516519
----------
@@ -529,8 +532,7 @@ def predict_proba(self, X):
529532

530533
@if_delegate_has_method(delegate="final_estimator_")
531534
def decision_function(self, X):
532-
"""Predict decision function for samples in X using
533-
`final_estimator_.decision_function`.
535+
"""Decision function for samples in `X` using the final estimator.
534536
535537
Parameters
536538
----------

0 commit comments

Comments
 (0)
0