Skip to content

ENH Adds n_feature_in_ checking to tree #18726

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 2 commits into from
Nov 2, 2020

Conversation

thomasjpfan
Copy link
Member

Continues #18514

Copy link
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 whatever the answer to the following question:

@@ -163,6 +162,7 @@ def fit(self, X, y, sample_weight=None, check_input=True,

# Determine output settings
n_samples, self.n_features_ = X.shape
self.n_features_in_ = self.n_features_
Copy link
Member

Choose a reason for hiding this comment

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

Shall we deprecate the n_features_ attribute then?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, I am planning on doing it in a follow up PR.

@glemaitre glemaitre merged commit 4d7e611 into scikit-learn:master Nov 2, 2020
@glemaitre
Copy link
Member

Thanks @thomasjpfan

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