Skip to content

DOC Improve docstring for tol in SequentialFeatureSelector #26271

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 2 commits into from
Apr 25, 2023
Merged
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
6 changes: 3 additions & 3 deletions sklearn/feature_selection/_sequential.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class SequentialFeatureSelector(SelectorMixin, MetaEstimatorMixin, BaseEstimator
n_features_to_select : "auto", int or float, default='warn'
If `"auto"`, the behaviour depends on the `tol` parameter:

- if `tol` is not `None`, then features are selected until the score
improvement does not exceed `tol`.
- if `tol` is not `None`, then features are selected while the score
change does not exceed `tol`.
- otherwise, half of the features are selected.

If integer, the parameter is the absolute number of features to select.
Expand All @@ -53,7 +53,7 @@ class SequentialFeatureSelector(SelectorMixin, MetaEstimatorMixin, BaseEstimator
The default changed from `None` to `"warn"` in 1.1 and will become
`"auto"` in 1.3. `None` and `'warn'` will be removed in 1.3.
To keep the same behaviour as `None`, set
`n_features_to_select="auto" and `tol=None`.
`n_features_to_select="auto"` and `tol=None`.

tol : float, default=None
If the score is not incremented by at least `tol` between two
Expand Down