org.apache.spark.mllib.tree.model
GradientBoostedTreesModel
Companion object GradientBoostedTreesModel
class GradientBoostedTreesModel extends TreeEnsembleModel with Saveable
Represents a gradient boosted trees model.
- Annotations
- @Since("1.2.0")
- Source
- treeEnsembleModels.scala
- Alphabetic
- By Inheritance
- GradientBoostedTreesModel
- Saveable
- TreeEnsembleModel
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new GradientBoostedTreesModel(algo: Algo, trees: Array[DecisionTreeModel], treeWeights: Array[Double])
- algo
algorithm for the ensemble model, either Classification or Regression
- trees
tree ensembles
- treeWeights
tree ensemble weights
- Annotations
- @Since("1.2.0")
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val algo: Algo
- Definition Classes
- GradientBoostedTreesModel → TreeEnsembleModel
- Annotations
- @Since("1.2.0")
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- val combiningStrategy: EnsembleCombiningStrategy
- Attributes
- protected
- Definition Classes
- TreeEnsembleModel
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def evaluateEachIteration(data: RDD[LabeledPoint], loss: Loss): Array[Double]
Method to compute error or loss for every iteration of gradient boosting.
Method to compute error or loss for every iteration of gradient boosting.
- data
- loss
evaluation metric.
- returns
an array with index i having the losses or errors for the ensemble containing the first i+1 trees
- Annotations
- @Since("1.4.0")
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def numTrees: Int
Get number of trees in ensemble.
Get number of trees in ensemble.
- Definition Classes
- TreeEnsembleModel
- def predict(features: JavaRDD[Vector]): JavaRDD[Double]
Java-friendly version of
org.apache.spark.mllib.tree.model.TreeEnsembleModel.predict
.Java-friendly version of
org.apache.spark.mllib.tree.model.TreeEnsembleModel.predict
.- Definition Classes
- TreeEnsembleModel
- def predict(features: RDD[Vector]): RDD[Double]
Predict values for the given data set.
Predict values for the given data set.
- features
RDD representing data points to be predicted
- returns
RDD[Double] where each entry contains the corresponding prediction
- Definition Classes
- TreeEnsembleModel
- def predict(features: Vector): Double
Predict values for a single data point using the model trained.
Predict values for a single data point using the model trained.
- features
array representing a single data point
- returns
predicted category from the trained model
- Definition Classes
- TreeEnsembleModel
- def save(sc: SparkContext, path: String): Unit
- sc
Spark context used to save model data.
- path
Path specifying the directory in which to save this model. If the directory already exists, this method throws an exception.
- Definition Classes
- GradientBoostedTreesModel → Saveable
- Annotations
- @Since("1.3.0")
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toDebugString: String
Print the full model to a string.
Print the full model to a string.
- Definition Classes
- TreeEnsembleModel
- def toString(): String
Print a summary of the model.
Print a summary of the model.
- Definition Classes
- TreeEnsembleModel → AnyRef → Any
- def totalNumNodes: Int
Get total number of nodes, summed over all trees in the ensemble.
Get total number of nodes, summed over all trees in the ensemble.
- Definition Classes
- TreeEnsembleModel
- val treeWeights: Array[Double]
- Definition Classes
- GradientBoostedTreesModel → TreeEnsembleModel
- Annotations
- @Since("1.2.0")
- val trees: Array[DecisionTreeModel]
- Definition Classes
- GradientBoostedTreesModel → TreeEnsembleModel
- Annotations
- @Since("1.2.0")
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)