-
Notifications
You must be signed in to change notification settings - Fork 123
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
Sample Weight Support? #89
Comments
Hi @kmedved 👋, thanks for your interest in the package! Indeed, supporting sample weight seems like it would be useful and especially interesting for hierarchical shrinkage - we'll add it in some time very soon :) |
An update: some of the models (but not all) now support |
Some parts of FIGS do not support |
Thanks for the work on this @csinva. Any update on getting sample weight supported added for hierarchical shrinkage? |
@aagarwal1996 @yanshuotan Can someone add in sample-weight support for HS? |
Actually HS already supports sample weights. Furthermore, line 84 of the code uses I do agree that it may be beneficial to make |
Hello - thanks all for the very interesting looking package. The hierarchical shrinkage wrapper seems especially interesting/novel. I'm interested in whether it would be possible to add sample weight support to this package? For background, sample weights are a fairly typical part of many scikit-learn packages (e.g.,
RandomForestRegressor
orHistGradientBoostingRegressor
, etc...), and are passed via the fit call, e.g.,model.fit(X_train, y_train, sample_weight = w_train)
.The purpose of sample weights is to increase the weighting of rows/observations based on some external criteria, typically based around how the training data was gathered, e.g., if your data has different sensors of varying sensitivity, you may increase the sample weighting of certain sensors. Or alternatively if your data is aggregated in some form, then you can increase the weights based on the aggregation (e.g., weekly data with a weight of 7, daily data with a weight of 1, etc...).
In terms of implementation, it's typically as simple as multiplying the loss for each row by the sample weights, to increase the model's sensitivity to large weightings, although I'm not sure if the novel hierarchical shrinkage capabilities of this package would present complications.
Thanks again for the very interesting looking package. I look forward to testing and using it.
The text was updated successfully, but these errors were encountered: