Skip to content

Check feature_names_in_ for sklearn.feature_extraction #20846

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
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sklearn/feature_extraction/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -1486,6 +1486,12 @@ class TfidfTransformer(TransformerMixin, BaseEstimator):

.. versionadded:: 1.0

feature_names_in_ : ndarray of shape (`n_features_in_`,)
Names of features seen during :term:`fit`. Defined only when `X`
has feature names that are all strings.

.. versionadded:: 1.0

See Also
--------
CountVectorizer : Transforms text into a sparse matrix of n-gram counts.
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 @@ -325,7 +325,6 @@ def test_check_n_features_in_after_fitting(estimator):

COLUMN_NAME_MODULES_TO_IGNORE = {
"compose",
"feature_extraction",
"model_selection",
}

Expand Down