Repository navigation
[python-package] support customizing Dataset creation in Booster.refit() (fixes #3038) - #4894
Conversation
jameslamb
left a comment
There was a problem hiding this comment.
Thanks for picking this up! I left some initial comments based on the format of what you're proposing, but I'm not the best person to comment on whether or not #3038 should be adopted at all.
For example, I don't know if the comment mentioned at #3038 (comment) means that init_score, weight, and group is still true.
Hopefully @guolinke @shiyu1994 or @StrikerRUS can comment on whether we should proceed with this feature.
I think it is useful that we want to change the weights of data points when refit. If we see For example, a new ranking dataset can have totally different |
|
@TremaMiguel Thanks for working on this! |
jameslamb
left a comment
There was a problem hiding this comment.
Thanks for the testing changes. Please see a few more suggestions I've provided.
jameslamb
left a comment
There was a problem hiding this comment.
Thanks very much. Please see some additional suggestions to make the tests a bit stronger.
jameslamb
left a comment
There was a problem hiding this comment.
Looks good to me, thanks very much!
I've edited the PR description so it will be a bit more informative when it's used as a bullet point in the release notes.
Before this is merged, I'd like another Python maintainer like @jmoralez or @StrikerRUS to review.
StrikerRUS
left a comment
There was a problem hiding this comment.
Thanks for working on this! Generally LGTM, just few minor fixes for the docstring.
|
@StrikerRUS @jameslamb @jmoralez is there any pending change to close this PR? |
StrikerRUS
left a comment
There was a problem hiding this comment.
LGTM! Thank you so much for your contribution!
|
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Context:
This PR aims to close #3038
Changes
kwargs_for_datasetparameter to pass weight parameter to Dataset initialization insiderefit().kwargs_for_predictparameter to pass original params topredictmethod.Tests:
Based on @jtilly example on issue #3038 test that
refitmethod returns a valid prediction value when passingkwargs_for_datasetorkwargs_for_predict.