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

Selection inside of label_binarize not supported #70

Open
sscdotopen opened this issue Jul 14, 2021 · 2 comments
Open

Selection inside of label_binarize not supported #70

sscdotopen opened this issue Jul 14, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@sscdotopen
Copy link
Collaborator

This does not work:

train_labels = label_binarize(train_data.helpful_votes > 0, classes=[True, False])

But this works:

train_data['is_helpful'] = train_data['helpful_votes'] > 0
train_labels = label_binarize(train_data['is_helpful'], classes=[True, False])
@sscdotopen sscdotopen added the bug Something isn't working label Jul 14, 2021
@stefan-grafberger
Copy link
Owner

To support this, we need to add support for the pd.Series binops and include them in the DAG. This is something that I already thought about but haven't gotten around to do. If the workaround works for you for now, I'd like to postpone work on this for a bit more. Basically, we need to patch __add__, __mul__, etc., and patch all of the comparison operations. This isn't difficult, but all of this together might take a few hours.

@sscdotopen
Copy link
Collaborator Author

The workaround is fine, no need to address this urgently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants