GitHub user jkbradley opened a pull request:
https://github.com/apache/spark/pull/3094
[mllib] GradientBoosting API cleanup and examples in Scala, Java
### Summary
* Made it easier to construct default Strategy and BoostingStrategy and to
set parameters using simple types.
* Added Scala and Java examples for GradientBoostedTrees
* small cleanups and fixes
### Details
GradientBoosting bug fixes (âbugâ = bad default options)
* Force boostingStrategy.weakLearnerParams.algo = Regression
* Force boostingStrategy.weakLearnerParams.impurity = impurity.Variance
* Only persist data if not yet persisted (since it causes an error if
persisted twice)
BoostingStrategy
* numEstimators: renamed to numIterations
* removed subsamplingRate (duplicated by Strategy)
* removed categoricalFeaturesInfo since it belongs with the weak learner
params (since boosting can be oblivious to feature type)
* Changed algo to var (not val) and added @BeanProperty, with overload
taking String argument
* Added assertValid() method
* Updated defaultParams() method and eliminated defaultWeakLearnerParams()
since that belongs in Strategy
Strategy (for DecisionTree)
* Changed algo to var (not val) and added @BeanProperty, with overload
taking String argument
* Added setCategoricalFeaturesInfo method taking Java Map.
* Cleaned up assertValid
* Changed valâs to defâs since parameters can now be changed.
CC: @manishamde @mengxr @codedeft
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jkbradley/spark gbt-api
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/3094.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3094
----
commit e9b841097e08ce3602acfb752bec0dd8edd1e43e
Author: Joseph K. Bradley <[email protected]>
Date: 2014-11-04T18:55:05Z
Summary of changes
* Made it easier to construct default Strategy and BoostingStrategy and to
set parameters using simple types.
* Added Scala and Java examples for GradientBoostedTrees
* small cleanups and fixes
Details
GradientBoosting bug fixes (âbugâ = bad default options)
* Force boostingStrategy.weakLearnerParams.algo = Regression
* Force boostingStrategy.weakLearnerParams.impurity = impurity.Variance
* Only persist data if not yet persisted (since it causes an error if
persisted twice)
BoostingStrategy
* numEstimators: renamed to numIterations
* removed subsamplingRate (duplicated by Strategy)
* removed categoricalFeaturesInfo since it belongs with the weak learner
params (since boosting can be oblivious to feature type)
* Changed algo to var (not val) and added @BeanProperty, with overload
taking String argument
* Added assertValid() method
* Updated defaultParams() method and eliminated defaultWeakLearnerParams()
since that belongs in Strategy
Strategy (for DecisionTree)
* Changed algo to var (not val) and added @BeanProperty, with overload
taking String argument
* Added setCategoricalFeaturesInfo method taking Java Map.
* Cleaned up assertValid
* Changed valâs to defâs since parameters can now be changed.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]