@@ -392,6 +392,7 @@ def fit(self, X, y):
392392 Returns
393393 -------
394394 self : object
395+ Returns the instance itself.
395396 """
396397 X , y = self ._validate_data (
397398 X , y , accept_sparse = ["csr" , "csc" ], multi_output = True
@@ -860,18 +861,6 @@ class GenericUnivariateSelect(_BaseFilter):
860861
861862 .. versionadded:: 0.24
862863
863- Examples
864- --------
865- >>> from sklearn.datasets import load_breast_cancer
866- >>> from sklearn.feature_selection import GenericUnivariateSelect, chi2
867- >>> X, y = load_breast_cancer(return_X_y=True)
868- >>> X.shape
869- (569, 30)
870- >>> transformer = GenericUnivariateSelect(chi2, mode='k_best', param=20)
871- >>> X_new = transformer.fit_transform(X, y)
872- >>> X_new.shape
873- (569, 20)
874-
875864 See Also
876865 --------
877866 f_classif : ANOVA F-value between label/feature for classification tasks.
@@ -885,6 +874,18 @@ class GenericUnivariateSelect(_BaseFilter):
885874 SelectFpr : Select features based on a false positive rate test.
886875 SelectFdr : Select features based on an estimated false discovery rate.
887876 SelectFwe : Select features based on family-wise error rate.
877+
878+ Examples
879+ --------
880+ >>> from sklearn.datasets import load_breast_cancer
881+ >>> from sklearn.feature_selection import GenericUnivariateSelect, chi2
882+ >>> X, y = load_breast_cancer(return_X_y=True)
883+ >>> X.shape
884+ (569, 30)
885+ >>> transformer = GenericUnivariateSelect(chi2, mode='k_best', param=20)
886+ >>> X_new = transformer.fit_transform(X, y)
887+ >>> X_new.shape
888+ (569, 20)
888889 """
889890
890891 _selection_modes : dict = {
0 commit comments