Package pyspark :: Package mllib :: Module tree :: Class DecisionTreeModel
[frames] | no frames]

Class DecisionTreeModel

source code

object --+
         |
        DecisionTreeModel


A decision tree model for classification or regression.

EXPERIMENTAL: This is an experimental API.
              It will probably be modified for Spark v1.2.

Instance Methods
 
__init__(self, sc, java_model)
:param sc: Spark context :param java_model: Handle to Java model object
source code
 
__del__(self) source code
 
predict(self, x)
Predict the label of one or more examples.
source code
 
numNodes(self) source code
 
depth(self) source code
 
__str__(self)
str(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, sc, java_model)
(Constructor)

source code 

:param sc: Spark context :param java_model: Handle to Java model object

Overrides: object.__init__

predict(self, x)

source code 

Predict the label of one or more examples.
:param x:  Data point (feature vector),
           or an RDD of data points (feature vectors).

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)