Skip to content

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

Merged
StrikerRUS merged 12 commits intomicrosoft:masterfrom
david-cortes:Rinterface7
Feb 23, 2022
Merged

[R-package] Promote objective and init_score to top-level arguments in lightgbm()#4976
StrikerRUS merged 12 commits intomicrosoft:masterfrom
david-cortes:Rinterface7

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.

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.

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.

@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.

@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
Contributor

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.

3 participants