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

[R-package] Promote objective and init_score to top-level arguments in lightgbm() #4976

Merged
merged 12 commits into from
Feb 23, 2022

Conversation

david-cortes
Copy link
Contributor

ref #4968

This PR promotes objective and init_score to top-level parameters in lightgbm(). This is for 3 reasons:

  • objective is probably one of the most common parameters to want to change. It's also accepted as a top-level parameter in the lgb.train interface and in the scikit-learn interface.
  • Having objective as a top-level parameter will allow an option "auto" in the future (as part of [R-package] User-friendly redesign for lightgbm() #4968) to adjust it automatically for binary and multi-class classification depending on the input.
  • Having init_score as a top-level parameter will allow to take it as a column from the input data in the future (as part of [R-package] User-friendly redesign for lightgbm() #4968), even if it right now looks out of place.

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I support adding init_score and objective as keyword arguments in lightgbm(). Please see the requested changes.

R-package/R/lightgbm.R Outdated Show resolved Hide resolved
R-package/R/lightgbm.R Outdated Show resolved Hide resolved
R-package/tests/testthat/test_basic.R Outdated Show resolved Hide resolved
R-package/R/lightgbm.R Outdated Show resolved Hide resolved
david-cortes and others added 3 commits February 13, 2022 19:23
Co-authored-by: James Lamb <jaylamb20@gmail.com>
@david-cortes
Copy link
Contributor Author

Updated.

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for the tests! Please see my most recent requested changes.

R-package/R/lightgbm.R Outdated Show resolved Hide resolved
R-package/R/lightgbm.R Outdated Show resolved Hide resolved
R-package/tests/testthat/test_basic.R Show resolved Hide resolved
R-package/vignettes/basic_walkthrough.Rmd Outdated Show resolved Hide resolved
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much! I think this is almost ready to merge, just a few more recommended changes.

R-package/tests/testthat/test_basic.R Show resolved Hide resolved
@david-cortes
Copy link
Contributor Author

Updated.

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! Just one more suggestion and this can be merged.

R-package/tests/testthat/test_basic.R Show resolved Hide resolved
@jameslamb jameslamb self-requested a review February 23, 2022 03:46
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just updated this with the latest changes from master, now that #5021 has been merged.

I'll merge this once it builds. Thanks very much for the contribution!

@jameslamb jameslamb mentioned this pull request Oct 7, 2022
40 tasks
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants