Skip to content

DOC fix ungrammatical sentence in doc of SelectFromModel #19240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/modules/feature_selection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ number of features.
Feature selection using SelectFromModel
=======================================

:class:`SelectFromModel` is a meta-transformer that can be used along with any
estimator that importance of each feature through a specific attribute (such as
``coef_``, ``feature_importances_``) or callable after fitting.
The features are considered unimportant and removed, if the corresponding
:class:`SelectFromModel` is a meta-transformer that can be used alongside any
estimator that assigns importance to each feature through a specific attribute (such as
``coef_``, ``feature_importances_``) or via an `importance_getter` callable after fitting.
The features are considered unimportant and removed if the corresponding
importance of the feature values are below the provided
``threshold`` parameter. Apart from specifying the threshold numerically,
there are built-in heuristics for finding a threshold using a string argument.
Expand Down
3 changes: 2 additions & 1 deletion sklearn/feature_selection/_from_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ class SelectFromModel(MetaEstimatorMixin, SelectorMixin, BaseEstimator):
estimator : object
The base estimator from which the transformer is built.
This can be both a fitted (if ``prefit`` is set to True)
or a non-fitted estimator. The estimator must have either a
or a non-fitted estimator. The estimator should have a
``feature_importances_`` or ``coef_`` attribute after fitting.
Otherwise, the ``importance_getter`` parameter should be used.

threshold : string or float, default=None
The threshold value to use for feature selection. Features whose
Expand Down