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

XGBoost gives warning about not using the parameter max_depth (R) #5750

Closed
shawnbrar opened this issue Jun 2, 2020 · 2 comments · Fixed by #5753
Closed

XGBoost gives warning about not using the parameter max_depth (R) #5750

shawnbrar opened this issue Jun 2, 2020 · 2 comments · Fixed by #5753
Labels

Comments

@shawnbrar
Copy link

I had just installed XGBoost on my Ubuntu 18.04. I was trying out the XGBoost R Tutorial. The library was working quiet properly. However, when I was in the ####Verbose Option section of the tutorial, when I would set verbose = 2, my output was not similar to how it was portrayed in the tutorial. It was the same output that I would get if I had put verbose = 1.

Another thing, when I was at the ### Linear Boosting section, if I were to use the following code:-

bst <- xgb.train(data = dtrain, max_depth = 2, eta = 1, nthread = 2, nrou nds = 2, watchlist = watchlist, objective = 'binary:logistic', verbose = 2, booster = 'gblinear')

I would get the following error:-

[19:29:10] WARNING: /home/shawn/Documents/Libs/xgboost/src/learner.cc:485:
Parameters: { max_depth } might not be used.

This may not be accurate due to some parameters are only used in language bindings but
passed down to XGBoost core. Or some parameters are not used but slip through this verification. Please open an issue if you find above cases.

[1] train-error:0.027330 test-error:0.022346
[2] train-error:0.004606 test-error:0.003724

However, if I were to remove the booster argument form the xgb.train function, I do not get the warning about the { max_depth } might not be used

@shawnbrar shawnbrar changed the title XGBoost gives warning about not using the parameter max_depth XGBoost gives warning about not using the parameter max_depth (R) Jun 2, 2020
@trivialfis
Copy link
Member

Thanks for rasing the issue, linear booster doesn't have depth, only tree has. So it's a correct warning.

@trivialfis trivialfis reopened this Jun 2, 2020
@trivialfis
Copy link
Member

The doc is incorrect. Reopening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants