@@ -785,7 +785,7 @@ def _get_support_mask(self):
785
785
786
786
787
787
class SelectFwe (_BaseFilter ):
788
- """Filter: Select the p-values corresponding to Family-wise error rate
788
+ """Filter: Select the p-values corresponding to Family-wise error rate.
789
789
790
790
Read more in the :ref:`User Guide <univariate_feature_selection>`.
791
791
@@ -800,17 +800,6 @@ class SelectFwe(_BaseFilter):
800
800
alpha : float, default=5e-2
801
801
The highest uncorrected p-value for features to keep.
802
802
803
- Examples
804
- --------
805
- >>> from sklearn.datasets import load_breast_cancer
806
- >>> from sklearn.feature_selection import SelectFwe, chi2
807
- >>> X, y = load_breast_cancer(return_X_y=True)
808
- >>> X.shape
809
- (569, 30)
810
- >>> X_new = SelectFwe(chi2, alpha=0.01).fit_transform(X, y)
811
- >>> X_new.shape
812
- (569, 15)
813
-
814
803
Attributes
815
804
----------
816
805
scores_ : array-like of shape (n_features,)
@@ -842,6 +831,17 @@ class SelectFwe(_BaseFilter):
842
831
SelectFdr : Select features based on an estimated false discovery rate.
843
832
GenericUnivariateSelect : Univariate feature selector with configurable
844
833
mode.
834
+
835
+ Examples
836
+ --------
837
+ >>> from sklearn.datasets import load_breast_cancer
838
+ >>> from sklearn.feature_selection import SelectFwe, chi2
839
+ >>> X, y = load_breast_cancer(return_X_y=True)
840
+ >>> X.shape
841
+ (569, 30)
842
+ >>> X_new = SelectFwe(chi2, alpha=0.01).fit_transform(X, y)
843
+ >>> X_new.shape
844
+ (569, 15)
845
845
"""
846
846
847
847
def __init__ (self , score_func = f_classif , * , alpha = 5e-2 ):
0 commit comments