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

Does learning rate apply to linear booster? #11106

Open
david-cortes opened this issue Dec 15, 2024 · 5 comments
Open

Does learning rate apply to linear booster? #11106

david-cortes opened this issue Dec 15, 2024 · 5 comments

Comments

@david-cortes
Copy link
Contributor

There are some hints throughout the R examples for linear boosters, such as in the docs for xgb.cb.gblinear.history, which mention things like:

With the deterministic coordinate descent updater, it is safer to use higher learning rates.

#' # With the deterministic coordinate descent updater, it is safer to use higher learning rates.

The examples then pass learning_rate (previously eta) in the parameters:

#' learning_rate = 0.8,

.. but according to the docs about parameters, eta and learning_rate are for tree-based boosters, or at least that's how they are documented, since they aren't listed as parameters for the linear booster:

* ``eta`` [default=0.3, alias: ``learning_rate``]

Does the linear booster use learning_rate / eta if passed under params?

@trivialfis
Copy link
Member

Yes, it's used.

@trivialfis
Copy link
Member

auto dbias = static_cast<float>(tparam_.learning_rate *

@david-cortes
Copy link
Contributor Author

Thanks. Sounds like the docs could be updated then, so as to list learning_rate under parameters for linear booster too. Other parameters like lambda are listed under both "tree booter" and "linear booster".

@trivialfis
Copy link
Member

Thank you for updating the doc!

@david-cortes
Copy link
Contributor Author

@trivialfis But I only updated the R docs. The online docs are still not showing the parameter under "linear booster". It's also not clear to me whether the default value is the same for both booster types either.

@trivialfis trivialfis reopened this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants