-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
compute_class_weight() class param behaviour #4327
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
Comments
Oh yeah. The idea being that the |
The reason we need |
[MRG] Fix for missing classes found in y - Fixes #4327
Not sure if it's relevant to the motivation behind the implementation as discussed in #4324 , but a two-class
y
array with two classes present in theclasses
param proceeds with the sum of the weights being equal to the number of classes:While a three-class y array with only two of the classes present in the
classes
param does something different altogether:I had sidestepped this in
compute_sample_weight
in #4190 by determining the present classes fromy
itself. I'm happy to open a PR to remove the param, and was going to, but while the function is somewhat private, it is exposed inpartial_fit
inBaseSGDClassifier
:So does this need a deprecation warning? Some more discussion?
The text was updated successfully, but these errors were encountered: