@@ -699,7 +699,7 @@ def _get_support_mask(self):
699
699
700
700
701
701
class SelectFdr (_BaseFilter ):
702
- """Filter: Select the p-values for an estimated false discovery rate
702
+ """Filter: Select the p-values for an estimated false discovery rate.
703
703
704
704
This uses the Benjamini-Hochberg procedure. ``alpha`` is an upper bound
705
705
on the expected false discovery rate.
@@ -717,17 +717,6 @@ class SelectFdr(_BaseFilter):
717
717
alpha : float, default=5e-2
718
718
The highest uncorrected p-value for features to keep.
719
719
720
- Examples
721
- --------
722
- >>> from sklearn.datasets import load_breast_cancer
723
- >>> from sklearn.feature_selection import SelectFdr, chi2
724
- >>> X, y = load_breast_cancer(return_X_y=True)
725
- >>> X.shape
726
- (569, 30)
727
- >>> X_new = SelectFdr(chi2, alpha=0.01).fit_transform(X, y)
728
- >>> X_new.shape
729
- (569, 16)
730
-
731
720
Attributes
732
721
----------
733
722
scores_ : array-like of shape (n_features,)
@@ -747,10 +736,6 @@ class SelectFdr(_BaseFilter):
747
736
748
737
.. versionadded:: 1.0
749
738
750
- References
751
- ----------
752
- https://en.wikipedia.org/wiki/False_discovery_rate
753
-
754
739
See Also
755
740
--------
756
741
f_classif : ANOVA F-value between label/feature for classification tasks.
@@ -765,6 +750,21 @@ class SelectFdr(_BaseFilter):
765
750
SelectFwe : Select features based on family-wise error rate.
766
751
GenericUnivariateSelect : Univariate feature selector with configurable
767
752
mode.
753
+
754
+ References
755
+ ----------
756
+ https://en.wikipedia.org/wiki/False_discovery_rate
757
+
758
+ Examples
759
+ --------
760
+ >>> from sklearn.datasets import load_breast_cancer
761
+ >>> from sklearn.feature_selection import SelectFdr, chi2
762
+ >>> X, y = load_breast_cancer(return_X_y=True)
763
+ >>> X.shape
764
+ (569, 30)
765
+ >>> X_new = SelectFdr(chi2, alpha=0.01).fit_transform(X, y)
766
+ >>> X_new.shape
767
+ (569, 16)
768
768
"""
769
769
770
770
def __init__ (self , score_func = f_classif , * , alpha = 5e-2 ):
0 commit comments