Skip to content
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

ENH Added test of analyzer and corrected the gap encoder options #242

Merged

Conversation

jovan-stojanovic
Copy link
Member

Thanks to @GaelVaroquaux, we noticed that the output of the gap encoder was identical when the parameter analyzer = "word" or analyzer = "char". This is not possible as the encoding method should be different.

A test was added to test_gap_encoder.py to ensure that this is no longer possible.

Line 580 was missing the analyzer parameter which created the problem of identical outputs.

Finally, the Hashing Vectorizor on line 864 didn't take into account the change of the analyzer parameter, but always stayed "char", is this normal?

Thanks!

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.

A few minor comments.

Can you also add an entry in the CHANGES.rst saying that we fixed a bug that resulted in the GapEncoder ignoring the analyzer argument.

dirty_cat/gap_encoder.py Outdated Show resolved Hide resolved
dirty_cat/test/test_gap_encoder.py Outdated Show resolved Hide resolved
dirty_cat/test/test_gap_encoder.py Outdated Show resolved Hide resolved
@jovan-stojanovic
Copy link
Member Author

Done.

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, will merge when the tests are green.

@GaelVaroquaux GaelVaroquaux merged commit 3250de0 into skrub-data:master Mar 18, 2022
@jovan-stojanovic jovan-stojanovic deleted the test-gap-encoder-analyzer branch March 28, 2022 06:56
@jovan-stojanovic jovan-stojanovic changed the title Added test of analyzer and corrected the gap encoder options ENH Added test of analyzer and corrected the gap encoder options Nov 16, 2022
@jovan-stojanovic jovan-stojanovic changed the title ENH Added test of analyzer and corrected the gap encoder options BUG Added test of analyzer and corrected the gap encoder options Nov 16, 2022
@jovan-stojanovic jovan-stojanovic changed the title BUG Added test of analyzer and corrected the gap encoder options ENH Added test of analyzer and corrected the gap encoder options Nov 16, 2022
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.

None yet

2 participants