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: implement handling of class_weights param #52

Closed
adriangb opened this issue Aug 13, 2020 · 2 comments · Fixed by #103
Closed

ENH: implement handling of class_weights param #52

adriangb opened this issue Aug 13, 2020 · 2 comments · Fixed by #103

Comments

@adriangb
Copy link
Owner

No description provided.

@adriangb
Copy link
Owner Author

It looks like for single-output models, this should be straightforwardish. The main complicating factor is that we're going to have to track this through our encode/decode strategy.

For multi-output models, this is a lot more complicated and may require a custom loss function link. I asked in TF (keras-team/keras#4735 (comment)) if there is an easier solution for multi-output models, but I get the feeling that there is not.

@adriangb
Copy link
Owner Author

adriangb commented Oct 3, 2020

I'm thinking we'll probably want to do this using https://scikit-learn.org/stable/modules/generated/sklearn.utils.class_weight.compute_sample_weight.html instead of relying on Keras. We'll just apply class_weights first then sample_weights.

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 a pull request may close this issue.

1 participant