Class/Object

org.apache.spark.mllib.tree.model

DecisionTreeModel

Related Docs: object DecisionTreeModel | package model

Permalink

class DecisionTreeModel extends Serializable with Saveable

Decision tree model for classification or regression. This model stores the decision tree structure and parameters.

Annotations
@Since( "1.0.0" )
Source
DecisionTreeModel.scala
Linear Supertypes
Saveable, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DecisionTreeModel
  2. Saveable
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DecisionTreeModel(topNode: Node, algo: Algo)

    Permalink

    topNode

    root node

    algo

    algorithm type -- classification or regression

    Annotations
    @Since( "1.0.0" )

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val algo: Algo

    Permalink

    algorithm type -- classification or regression

    algorithm type -- classification or regression

    Annotations
    @Since( "1.0.0" )
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def depth: Int

    Permalink

    Get depth of tree.

    Get depth of tree. E.g.: Depth 0 means 1 leaf node. Depth 1 means 1 internal node and 2 leaf nodes.

    Annotations
    @Since( "1.1.0" )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def formatVersion: String

    Permalink

    Current version of model save/load format.

    Current version of model save/load format.

    Attributes
    protected
    Definition Classes
    DecisionTreeModelSaveable
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def numNodes: Int

    Permalink

    Get number of nodes in tree, including leaf nodes.

    Get number of nodes in tree, including leaf nodes.

    Annotations
    @Since( "1.1.0" )
  19. def predict(features: JavaRDD[Vector]): JavaRDD[Double]

    Permalink

    Predict values for the given data set using the model trained.

    Predict values for the given data set using the model trained.

    features

    JavaRDD representing data points to be predicted

    returns

    JavaRDD of predictions for each of the given data points

    Annotations
    @Since( "1.2.0" )
  20. def predict(features: RDD[Vector]): RDD[Double]

    Permalink

    Predict values for the given data set using the model trained.

    Predict values for the given data set using the model trained.

    features

    RDD representing data points to be predicted

    returns

    RDD of predictions for each of the given data points

    Annotations
    @Since( "1.0.0" )
  21. def predict(features: Vector): Double

    Permalink

    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

    Double prediction from the trained model

    Annotations
    @Since( "1.0.0" )
  22. def save(sc: SparkContext, path: String): Unit

    Permalink

    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
    DecisionTreeModelSaveable
    Annotations
    @Since( "1.3.0" )
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toDebugString: String

    Permalink

    Print the full model to a string.

    Print the full model to a string.

    Annotations
    @Since( "1.2.0" )
  25. def toString(): String

    Permalink

    Print a summary of the model.

    Print a summary of the model.

    Definition Classes
    DecisionTreeModel → AnyRef → Any
  26. val topNode: Node

    Permalink

    root node

    root node

    Annotations
    @Since( "1.0.0" )
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Saveable

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped