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

[xgboost4j-spark] Allow set the parameter "maxLeaves". #4226

Merged
merged 2 commits into from
Mar 8, 2019

Conversation

shishaochen
Copy link
Contributor

When tree_method="hist" and grow_policy="lossguide", max_leaves is needed.

@CodingCat
Copy link
Member

sorry, I missed it , with 0.82, you can pass with paramMap like https://github.com/dmlc/xgboost/blob/master/jvm-packages/xgboost4j-example/src/main/scala/ml/dmlc/xgboost4j/scala/example/spark/SparkTraining.scala#L66-L72

can you also add to XGBoostRegressor?

@shishaochen
Copy link
Contributor Author

@CodingCat Sure! I have added "setMaxLeaves" to XGBoostRegressor in the new commit.
Acutally, xgboost4j-spark only support a subset of all parameters. Then, most users may check whether a parameter is allowed by scanning setter methods in XGBoost scala wrappers.

@CodingCat CodingCat merged commit 224786f into dmlc:master Mar 8, 2019
@CodingCat
Copy link
Member

merged, thanks

@shishaochen shishaochen deleted the add-max-leaves branch March 8, 2019 14:47
@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants