8000 MNT Update doc and param validation for SequentialFeatureSelector abo… · scikit-learn/scikit-learn@db8d67c · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit db8d67c

Browse files
authored
MNT Update doc and param validation for SequentialFeatureSelector about scoring (#24296)
1 parent 6d16698 commit db8d67c

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

sklearn/feature_selection/_sequential.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,12 @@ class SequentialFeatureSelector(SelectorMixin, MetaEstimatorMixin, BaseEstimator
6464
direction : {'forward', 'backward'}, default='forward'
6565
Whether to perform forward selection or backward selection.
6666
67-
scoring : str, callable, list/tuple or dict, default=None
67+
scoring : str or callable, default=None
6868
A single str (see :ref:`scoring_parameter`) or a callable
6969
(see :ref:`scoring`) to evaluate the predictions on the test set.
7070
71-
NOTE that when using custom scorers, each scorer should return a single
72-
value. Metric functions returning a list/array of values can be wrapped
73-
into multiple scorers that return one value each.
71+
NOTE that when using a custom scorer, it should return a single
72+
value.
7473
7574
If None, the estimator's score method is used.
7675
@@ -156,14 +155,7 @@ class SequentialFeatureSelector(SelectorMixin, MetaEstimatorMixin, BaseEstimator
156155
],
157156
"tol": [None, Interval(Real, 0, None, closed="neither")],
158157
"direction": [StrOptions({"forward", "backward"})],
159-
"scoring": [
160-
None,
161-
StrOptions(set(get_scorer_names())),
162-
callable,
163-
list,
164-
dict,
165-
tuple,
166-
],
158+
"scoring": [None, StrOptions(set(get_scorer_names())), callable],
167159
"cv": ["cv_object"],
168160
"n_jobs": [None, Integral],
169161
}

0 commit comments

Comments
 (0)
0