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

Support for sample_weight in the fit method #438

Closed
kota7 opened this issue Sep 23, 2018 · 3 comments
Closed

Support for sample_weight in the fit method #438

kota7 opened this issue Sep 23, 2018 · 3 comments

Comments

@kota7
Copy link
Contributor

kota7 commented Sep 23, 2018

Is there any plan or demand for supporting sample_weight option in the fit method of estimators?

Since a number of model classes in scikit-learn support it, I suppose it would be useful for estimators such as StackingRegressor (provided that all regressors accept it).

I saw a related PR #255 about the support for fit_params options. Once this is merged, sample_weight will be implementable by passing same weights to all regressors and meta-regressor. Even so, API like fit(X, y [, sample_weight]) can be handy.

@kota7 kota7 changed the title Support for sample_weight in the fit method. Support for sample_weight in the fit method Sep 23, 2018
@rasbt
Copy link
Owner

rasbt commented Sep 23, 2018

I think support for sample_weight would be a good thing to have. I think if the fit methods support fit_params the sample_weight would be supported automatically, right? I am currently not sure whether #255 is still active. If not, would you like to take it over?

@kota7
Copy link
Contributor Author

kota7 commented Sep 23, 2018

@rasbt I will have a look. At first glance, it looks close but not entirely automatic. In #255 it looks fit_params are given per estimator basis, while support for sample_weight requires options applied to all estimators in the both levels.

@rasbt
Copy link
Owner

rasbt commented Sep 23, 2018

Good point. Maybe having a separate sample_weights param would be the better option then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants