Skip to content

Commit 44c44a5

Browse files
authored
DOC minimal docstring fix + UG for feature selection (scikit-learn#16810)
1 parent ab01816 commit 44c44a5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

doc/modules/feature_selection.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ The features are considered unimportant and removed, if the corresponding
152152
``threshold`` parameter. Apart from specifying the threshold numerically,
153153
there are built-in heuristics for finding a threshold using a string argument.
154154
Available heuristics are "mean", "median" and float multiples of these like
155-
"0.1*mean".
155+
"0.1*mean". In combination with the `threshold` criteria, one can use the
156+
`max_features` parameter to set a limit on the number of features to select.
156157

157158
For examples on how it is to be used refer to the sections below.
158159

sklearn/feature_selection/_from_model.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,8 @@ class SelectFromModel(MetaEstimatorMixin, SelectorMixin, BaseEstimator):
116116
estimator is of dimension 2.
117117
118118
max_features : int or None, optional
119-
The maximum number of features selected scoring above ``threshold``.
120-
To disable ``threshold`` and only select based on ``max_features``,
121-
set ``threshold=-np.inf``.
119+
The maximum number of features to select.
120+
To only select based on ``max_features``, set ``threshold=-np.inf``.
122121
123122
.. versionadded:: 0.20
124123

0 commit comments

Comments
 (0)