8000 [MRG] CLN: remove duplicate validation of X in Encoders transform by jorisvandenbossche · Pull Request #13347 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG] CLN: remove duplicate validation of X in Encoders transform #13347

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

Conversation

jorisvandenbossche
Copy link
Member

The self._transform method already calls self._check_X which does this same validation (check_array) of X, so it should not be needed here (and confirmed by by the passing tests).

This also prevented actually handling the DataFrame column by column on transform (#13253), but this is difficult to test now since both numpy and python encoding methods result in the same.

Copy link
Member
@GaelVaroquaux GaelVaroquaux left a comment

Choose a reason for hiding this comment

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

LGTM, aside from the request for a comment.

X = X_temp

n_samples, n_features = X.shape

Copy link
Member

Choose a reason for hiding this comment

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

Maybe it would be useful to add a comment saying that input validation is done in self._transform

@jorisvandenbossche jorisvandenbossche merged commit afd4321 into scikit-learn:master Mar 2, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0