-
Notifications
You must be signed in to change notification settings - Fork 120
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
add get_feature_names_out to MinHashEncoder #616
Conversation
There was a problem hiding this 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:
replace ` by `` Co-authored-by: Vincent M <maladiere.vincent@yahoo.fr>
Thanks for the comments @Vincent-Maladiere ! |
There was a problem hiding this 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 :)
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>
We generate feature names as
feature_name_1_0
, ...feature_name_1_n_components
etc. If feature names are missing, we usex_0
,x_1
etc(+ a test to check that the MinHashEncoder is deterministic)