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

mtry maps to wrong parameter for XGBoost #495

Closed
smingerson opened this issue May 17, 2021 · 2 comments · Fixed by #499
Closed

mtry maps to wrong parameter for XGBoost #495

smingerson opened this issue May 17, 2021 · 2 comments · Fixed by #499
Labels
bug an unexpected problem or unintended behavior

Comments

@smingerson
Copy link

From ?boost_tree, we have

mtry: The number of predictors that will be randomly sampled at each split when creating the tree models.

In the model argument translation for XGBoost, we have mtry maps to colsample_bytree.

However, the XGBoost documentation says

colsample_bytree is the subsample ratio of columns when constructing each tree. Subsampling occurs once for every tree constructed.

I don't read this and mtry as meaning the same thing. In fact, mtry sounds more like this XGBoost documentation excerpt:

colsample_bynode is the subsample ratio of columns for each node (split). Subsampling occurs once every time a new split is evaluated. Columns are subsampled from the set of columns chosen for the current level.

@juliasilge
Copy link
Member

Hmmmm, I think you are right. The other boosted tree implementation that we support with mtry is from sparklyr, where it is called feature_subset_strategy and says:

The number of features to consider for splits at each tree node. See details for options.

So also clearly about splitting at nodes.

@juliasilge juliasilge added the bug an unexpected problem or unintended behavior label May 18, 2021
topepo added a commit that referenced this issue May 19, 2021
topepo added a commit that referenced this issue May 21, 2021
xgboost mtry parameter swap for #495
@github-actions
Copy link

github-actions bot commented Jun 5, 2021

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants