Skip to content

add get_feature_names_out to MinHashEncoder #616

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

Conversation

LeoGrin
Copy link
Contributor

@LeoGrin LeoGrin commented Jun 22, 2023

We generate feature names as feature_name_1_0, ... feature_name_1_n_components etc. If feature names are missing, we use x_0, x_1 etc
(+ a test to check that the MinHashEncoder is deterministic)

Copy link
Member

@Vincent-Maladiere Vincent-Maladiere left a comment

Choose a reason for hiding this comment

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

Hey @LeoGrin, thanks for the PR! Hopefully, this will play nicely with TableVectorizer :)

Here are a couple of quick remarks:

LeoGrin and others added 2 commits June 23, 2023 16:03
replace ` by ``

Co-authored-by: Vincent M <maladiere.vincent@yahoo.fr>
@LeoGrin
Copy link
Contributor Author

LeoGrin commented Jun 23, 2023

Thanks for the comments @Vincent-Maladiere !

Copy link
Member

@Vincent-Maladiere Vincent-Maladiere left a comment

Choose a reason for hiding this comment

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

Thanks @LeoGrin! LGTM after CI is green :)

Copy link
Member

@jovan-stojanovic jovan-stojanovic left a comment

Choose a reason for hiding this comment

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

Thanks Leo! Two minor precision and this is good to be merged


def test_deterministic():
"""Test that the encoder is deterministic"""
# TODO: add random state to encoder
Copy link
Member

Choose a reason for hiding this comment

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

Is there randomness? If it's deterministic, no need for random state.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now it's deterministic because the seed in the hash is fixed, but we could imagine allowing the user to vary the seed.

Co-authored-by: Jovan Stojanovic <62058944+jovan-stojanovic@users.noreply.github.com>
@jovan-stojanovic jovan-stojanovic merged commit a7e0e41 into skrub-data:main Jun 26, 2023
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.

4 participants