8000 ENH Adds n_features_in_ checking to feature_selection by thomasjpfan · Pull Request #19344 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

ENH Adds n_features_in_ checking to feature_selection #19344

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
F 10000 ailed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sklearn/feature_selection/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ def transform(self, X):
"""
# note: we use _safe_tags instead of _get_tags because this is a
# public Mixin.
X = check_array(
X = self._validate_data(
X,
dtype=None,
accept_sparse="csr",
force_all_finite=not _safe_tags(self, key="allow_nan"),
reset=False,
)
mask = self.get_support()
if not mask.any():
Expand Down
1 change: 0 additions & 1 deletion sklearn/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ def test_search_cv(estimator, check, request):
'discriminant_analysis',
'ensemble',
'feature_extraction',
'feature_selection',
'isotonic',
'manifold',
'mixture',
Expand Down
0