@@ -184,6 +184,12 @@ def _estimator_type(self):
184184
185185 @property
186186 def classes_ (self ):
187+ """Classes labels available when `estimator` is a classifier.
188+
189+ Returns
190+ -------
191+ ndarray of shape (n_classes,)
192+ """
187193 return self .estimator_ .classes_
188194
189195 def fit (self , X , y ):
@@ -196,6 +202,11 @@ def fit(self, X, y):
196202
197203 y : array-like of shape (n_samples,)
198204 The target values.
205+
206+ Returns
207+ -------
208+ self : object
209+ Fitted estimator.
199210 """
200211 return self ._fit (X , y )
201212
@@ -407,8 +418,7 @@ def _more_tags(self):
407418
408419
409420class RFECV (RFE ):
410- """Feature ranking with recursive feature elimination and cross-validated
411- selection of the best number of features.
421+ """Recursive feature elimination with cross-validation to select the number of features.
412422
413423 See glossary entry for :term:`cross-validation estimator`.
414424
@@ -457,7 +467,7 @@ class RFECV(RFE):
457467 .. versionchanged:: 0.22
458468 ``cv`` default value of None changed from 3-fold to 5-fold.
459469
460- scoring : string , callable or None, default=None
470+ scoring : str , callable or None, default=None
461471 A string (see model evaluation documentation) or
462472 a scorer callable object / function with signature
463473 ``scorer(estimator, X, y)``.
@@ -522,6 +532,10 @@ class RFECV(RFE):
522532 support_ : ndarray of shape (n_features,)
523533 The mask of selected features.
524534
535+ See Also
536+ --------
537+ RFE : Recursive feature elimination.
538+
525539 Notes
526540 -----
527541 The size of ``grid_scores_`` is equal to
@@ -530,6 +544,13 @@ class RFECV(RFE):
530544
531545 Allows NaN/Inf in the input if the underlying estimator does as well.
532546
547+ References
548+ ----------
549+
550+ .. [1] Guyon, I., Weston, J., Barnhill, S., & Vapnik, V., "Gene selection
551+ for cancer classification using support vector machines",
552+ Mach. Learn., 46(1-3), 389--422, 2002.
553+
533554 Examples
534555 --------
535556 The following example shows how to retrieve the a-priori not known 5
@@ -547,17 +568,6 @@ class RFECV(RFE):
547568 False])
548569 >>> selector.ranking_
549570 array([1, 1, 1, 1, 1, 6, 4, 3, 2, 5])
550-
551- See Also
552- --------
553- RFE : Recursive feature elimination.
554-
555- References
556- ----------
557-
558- .. [1] Guyon, I., Weston, J., Barnhill, S., & Vapnik, V., "Gene selection
559- for cancer classification using support vector machines",
560- Mach. Learn., 46(1-3), 389--422, 2002.
561571 """
562572
563573 def __init__ (
@@ -600,6 +610,11 @@ def fit(self, X, y, groups=None):
600610 instance (e.g., :class:`~sklearn.model_selection.GroupKFold`).
601611
602612 .. versionadded:: 0.20
613+
614+ Returns
615+ -------
616+ self : object
617+ Fitted estimator.
603618 """
604619 tags = self ._get_tags ()
605620 X , y = self ._validate_data (
0 commit comments