Class BoostingStrategy
- All Implemented Interfaces:
- Serializable,- scala.Equals,- scala.Product
GradientBoostedTrees.
 
 param:  treeStrategy Parameters for the tree algorithm. We support regression and binary
                     classification for boosting. Impurity setting will be ignored.
 param:  loss Loss function used for minimization during gradient boosting.
 param:  numIterations Number of iterations of boosting.  In other words, the number of
                      weak hypotheses used in the final model.
 param:  learningRate Learning rate for shrinking the contribution of each estimator. The
                     learning rate should be between in the interval (0, 1]
 param:  validationTol validationTol is a condition which decides iteration termination when
                      runWithValidation is used.
                      The end of iteration is decided based on below logic:
                      If the current loss on the validation set is greater than 0.01, the diff
                      of validation error is compared to relative tolerance which is
                      validationTol * (current loss on the validation set).
                      If the current loss on the validation set is less than or equal to 0.01,
                      the diff of validation error is compared to absolute tolerance which is
                      validationTol * 0.01.
                      Ignored when
                      org.apache.spark.mllib.tree.GradientBoostedTrees.run() is used.
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionBoostingStrategy(Strategy treeStrategy, Loss loss, int numIterations, double learningRate, double validationTol) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic BoostingStrategydefaultParams(String algo) Returns default configuration for the boosting algorithmstatic BoostingStrategydefaultParams(scala.Enumeration.Value algo) Returns default configuration for the boosting algorithmdoublegetLoss()intdoubledoubleloss()intvoidsetLearningRate(double x$1) voidvoidsetNumIterations(int x$1) voidsetTreeStrategy(Strategy x$1) voidsetValidationTol(double x$1) doubleMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface scala.EqualscanEqual, equalsMethods inherited from interface scala.ProductproductArity, productElement, productElementName, productElementNames, productIterator, productPrefix
- 
Constructor Details- 
BoostingStrategy
 
- 
- 
Method Details- 
defaultParamsReturns default configuration for the boosting algorithm- Parameters:
- algo- Learning goal. Supported: "Classification" or "Regression"
- Returns:
- Configuration for boosting algorithm
 
- 
defaultParamsReturns default configuration for the boosting algorithm- Parameters:
- algo- Learning goal. Supported:- org.apache.spark.mllib.tree.configuration.Algo.Classification,- org.apache.spark.mllib.tree.configuration.Algo.Regression
- Returns:
- Configuration for boosting algorithm
 
- 
treeStrategy
- 
loss
- 
numIterationspublic int numIterations()
- 
learningRatepublic double learningRate()
- 
validationTolpublic double validationTol()
- 
getLearningRatepublic double getLearningRate()
- 
getLoss
- 
getNumIterationspublic int getNumIterations()
- 
getTreeStrategy
- 
getValidationTolpublic double getValidationTol()
- 
setLearningRatepublic void setLearningRate(double x$1) 
- 
setLoss
- 
setNumIterationspublic void setNumIterations(int x$1) 
- 
setTreeStrategy
- 
setValidationTolpublic void setValidationTol(double x$1) 
 
-