8000 DOC Ensures that SelectFpr passes numpydoc validation (#20985) · scikit-learn/scikit-learn@693a348 · GitHub
[go: up one dir, main page]

Skip to content

Commit 693a348

Browse files
jmloyolaglemaitre
authored andcommitted
DOC Ensures that SelectFpr passes numpydoc validation (#20985)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent 8ab2530 commit 693a348

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

maint_tools/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
"RobustScaler",
6161
"SGDOneClassSVM",
6262
"SGDRegressor",
63-
"SelectFpr",
6463
"SelectFromModel",
6564
"SelectFwe",
6665
"SelfTrainingClassifier",

sklearn/feature_selection/_univariate_selection.py

Lines changed: 11 additions & 11 deletions
< 8000 /div>
Original file line numberDiff line numberDiff line change
@@ -661,17 +661,6 @@ class SelectFpr(_BaseFilter):
661661
662662
.. versionadded:: 1.0
663663
664-
Examples
665-
--------
666-
>>> from sklearn.datasets import load_breast_cancer
667-
>>> from sklearn.feature_selection import SelectFpr, chi2
668-
>>> X, y = load_breast_cancer(return_X_y=True)
669-
>>> X.shape
670-
(569, 30)
671-
>>> X_new = SelectFpr(chi2, alpha=0.01).fit_transform(X, y)
672-
>>> X_new.shape
673-
(569, 16)
674-
675664
See Also
676665
--------
677666
f_classif : ANOVA F-value between label/feature for classification tasks.
@@ -686,6 +675,17 @@ class SelectFpr(_BaseFilter):
686675
SelectFwe : Select features based on family-wise error rate.
687676
GenericUnivariateSelect : Univariate feature selector with configurable
688677
mode.
678+
679+
Examples
680+
--------
681+
>>> from sklearn.datasets import load_breast_cancer
682+
>>> from sklearn.feature_selection import SelectFpr, chi2
683+
>>> X, y = load_breast_cancer(return_X_y=True)
684+
>>> X.shape
685+
(569, 30)
686+
>>> X_new = SelectFpr(chi2, alpha=0.01).fit_transform(X, y)
687+
>>> X_new.shape
688+
(569, 16)
689689
"""
690690

691691
def __init__(self, score_func=f_classif, *, alpha=5e-2):

0 commit comments

Comments
 (0)
0