-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-5317]Set BoostingStrategy.defaultParams With Enumeration Algo.Classification or Algo.Regression #4103
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
Conversation
Can one of the admins verify this patch? |
ok to test |
Test build #25764 has started for PR 4103 at commit
|
Test build #25764 has finished for PR 4103 at commit
|
Test PASSed. |
@@ -506,7 +506,7 @@ JavaRDD<LabeledPoint> testData = splits[1]; | |||
|
|||
// Train a GradientBoostedTrees model. | |||
// The defaultParams for Classification use LogLoss by default. | |||
BoostingStrategy boostingStrategy = BoostingStrategy.defaultParams("Classification"); | |||
BoostingStrategy boostingStrategy = BoostingStrategy.defaultParams(Algo.Classification); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work in Java. You need at least "Algo.Classification()`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that I am a little careless about the docs of Java version. I will update it.
Test build #25865 has started for PR 4103 at commit
|
Test build #25865 has finished for PR 4103 at commit
|
Test PASSed. |
Test build #25933 has started for PR 4103 at commit
|
Test build #25933 has finished for PR 4103 at commit
|
Test PASSed. |
@@ -70,20 +70,31 @@ object BoostingStrategy { | |||
|
|||
/** | |||
* Returns default configuration for the boosting algorithm | |||
* @param algoStr Learning goal. Supported: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my bad. In Scala, the parameter name is part of the API. So let's not rename algo
to algoStr
.
Test build #25943 has started for PR 4103 at commit
|
LGTM pending Jenkins. |
Test build #25943 has finished for PR 4103 at commit
|
Test PASSed. |
JIRA Issue: https://issues.apache.org/jira/browse/SPARK-5317
When setting the BoostingStrategy.defaultParams("Classification"), It's more straightforward to set it with the Enumeration Algo.Classification, just like BoostingStragety.defaultParams(Algo.Classification).
I overload the method BoostingStragety.defaultParams().