Hello everyone,

I noticed that two of the three solvers in the logistic regression module
(newton-cg and lbfgs) accept sample weights, but this feature is hidden
away from users by not recognizing sample_weight as parameter in .ft().
Instead, sample_weight is set to ones (line 555 of logistic.py). To the
best of my knowledge this is because the default solver (liblinear) does
not support them?

Could we instead allow sample_weight as a parameter (default None) and set
them to ones only if the chosen solver is liblinear (with appropriate
documentation notes - similar to the way the L1 penalty is supported only
by liblinear)?

I realize that SGDClassifier's .fit() accepts sample weights and the loss
can be set to 'log', however this isn't exactly the same.

What do you think?

Valentin
------------------------------------------------------------------------------
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to