Skip to content

ENH Checks n_features_in_ after fitting in mixture#19540

Merged
jeremiedbb merged 4 commits intoscikit-learn:mainfrom
thomasjpfan:check_n_features_in_mixture
Mar 23, 2021
Merged

ENH Checks n_features_in_ after fitting in mixture#19540
jeremiedbb merged 4 commits intoscikit-learn:mainfrom
thomasjpfan:check_n_features_in_mixture

Conversation

@thomasjpfan
Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan commented Feb 24, 2021

Reference Issues/PRs

Related to #19333

What does this implement/fix? Explain your changes.

Checks n_features_in_ after fitting in mixture module.

Any other comments?

I also moved the self.component validation to fit, since this is the only time it is called.

Copy link
Copy Markdown
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Copy Markdown
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM as well. Shouldn't the doc of n_features_in_ be done in this PR for (Bayesian)GaussianMixture ?

@thomasjpfan
Copy link
Copy Markdown
Member Author

Added the attribute to the docstring. Note that the versionadded is 0.24, because n_features_in_ is first introduced in 0.24.

@jeremiedbb
Copy link
Copy Markdown
Member

Thanks @thomasjpfan !

@jeremiedbb jeremiedbb merged commit cf296c7 into scikit-learn:main Mar 23, 2021
@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
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.

3 participants