Skip to content

FIX bug - display output features in CountVectorizer HTML - #33779

Merged
jeremiedbb merged 6 commits into
scikit-learn:mainfrom
DeaMariaLeon:bug
Apr 22, 2026
Merged

jeremiedbb merged 6 commits into
scikit-learn:mainfrom
DeaMariaLeon:bug

Conversation

@DeaMariaLeon

Copy link
Copy Markdown
Member

Reference Issues/PRs

Fixes #33772

What does this implement/fix? Explain your changes.

Removed a check for n_features_in_ that was used to double check that the estimator was fitted. But there is already the is_fitted_css_class and most importantly, CountVectorizer doesn't have that attribute.
So, the number and names of output features were not being displayed for it.

AI usage disclosure

I used AI assistance for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Any other comments?

@DeaMariaLeon
DeaMariaLeon marked this pull request as draft April 17, 2026 06:37
Comment thread sklearn/utils/_repr_html/estimator.py Resolved
@DeaMariaLeon DeaMariaLeon moved this to In progress in Labs Apr 20, 2026
@DeaMariaLeon DeaMariaLeon changed the title FIX bug - removed n_features_in_ check FIX bug - removed n_features_in_ check to display output features in CountVectorizer HTML Apr 20, 2026
@adrinjalali adrinjalali moved this from In progress to Todo in Labs Apr 20, 2026
@DeaMariaLeon
DeaMariaLeon marked this pull request as ready for review April 20, 2026 10:17
@DeaMariaLeon DeaMariaLeon moved this from Todo to In progress in Labs Apr 20, 2026
@DeaMariaLeon DeaMariaLeon changed the title FIX bug - removed n_features_in_ check to display output features in CountVectorizer HTML FIX bug - display output features in CountVectorizer HTML Apr 20, 2026
@DeaMariaLeon DeaMariaLeon moved this from In progress to Blocked in Labs Apr 21, 2026

@jeremiedbb jeremiedbb left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reproducer works as expected now. LGTM. Thanks
(no need for a changelog it's not released yet)

@jeremiedbb
jeremiedbb merged commit 8ecc476 into scikit-learn:main Apr 22, 2026
38 of 39 checks passed
@github-project-automation github-project-automation Bot moved this from Blocked to Done in Labs Apr 22, 2026
@DeaMariaLeon
DeaMariaLeon deleted the bug branch April 23, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG HTML Display not showing output features for CountVectorizer

3 participants