GradientBoostedTreesModel¶
-
class
pyspark.mllib.tree.
GradientBoostedTreesModel
(java_model)[source]¶ Represents a gradient-boosted tree model.
New in version 1.3.0.
Methods
Methods Documentation
-
call
(name, *a)¶ Call method of java_model
-
classmethod
load
(sc, path)¶ Load a model from the given path.
New in version 1.3.0.
-
numTrees
()¶ Get number of trees in ensemble.
New in version 1.3.0.
-
predict
(x)¶ Predict values for a single data point or an RDD of points using the model trained.
Note
In Python, predict cannot currently be used within an RDD transformation or action. Call predict directly on the RDD instead.
New in version 1.3.0.
-
save
(sc, path)¶ Save this model to the given path.
New in version 1.3.0.
-
toDebugString
()¶ Full model
New in version 1.3.0.
-
totalNumNodes
()¶ Get total number of nodes, summed over all trees in the ensemble.
New in version 1.3.0.
-