Class

algorithms

DecisionTree

Related Doc: package algorithms

Permalink

class DecisionTree extends AnyRef

A class representing a decision tree

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DecisionTree
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DecisionTree(depth: Int)

    Permalink

    Create a new decision tree

    Create a new decision tree

    depth

    Depth of the tree

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def atNode[T](nodeIndex: Int, X: List[List[Double]], y: List[T], sampleWeight: List[Double] = Nil): (List[List[Double]], List[T], List[Double])

    Permalink

    Returns the data (instances and labels) present at this node

    Returns the data (instances and labels) present at this node

    nodeIndex

    The node index

    X

    List of instances

    y

    List of labels

    sampleWeight

    Optional list of sample weights

    returns

    List of instances, list of labels and list of sample weights, being a subset of the input X, y and sampleWeight

  6. def classify(instance: List[Double]): Int

    Permalink

    Classifies an instance based on its feature vector

    Classifies an instance based on its feature vector

    instance

    Feature list of an instance

    returns

    Predicted label

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  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. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def initTree(nNodes: Int, tree: List[DecisionNode]): List[DecisionNode]

    Permalink

    Initializes a list of nodes

    Initializes a list of nodes

    nNodes

    number of nodes to initialize

    tree

    start/intermediate tree object

    returns

    List of nodes

  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def nFilledNodes(): Int

    Permalink

    Counts the nodes which have been filled by the user

  16. val nNodes: Int

    Permalink

    Number of nodes in this tree

  17. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def predict(instance: List[Double]): Double

    Permalink

    Predicits an instance's label based on its feature vector

    Predicits an instance's label based on its feature vector

    instance

    Feature list of an instance

    returns

    Predicted label

  21. def setNode(nodeIndex: Int, featureIndex: Int, threshold: Double, greater: Boolean, mean: Double, nSamples: Int, purity: Double = Double.MinValue): Unit

    Permalink

    Sets node attributes

    Sets node attributes

    nodeIndex

    The index of the node to be customized

    featureIndex

    The index of the feature the node decides on

    threshold

    The threshold the node's decision will apply

    greater

    Is the signal region greater or less than the threshold?

    purity

    The purity of the split in this node

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    DecisionTree → AnyRef → Any
  24. val tree: List[DecisionNode]

    Permalink

    The object holding the nodes

  25. def updateNode(nodeIndex: Int, featureIndex: Int, threshold: Double, greater: Boolean, mean: Double, nSamples: Int, purity: Double): Unit

    Permalink

    Updates an existing node with new decision instructions, in case its purity is improved

    Updates an existing node with new decision instructions, in case its purity is improved

    nodeIndex

    The index of the node to be customized

    featureIndex

    The index of the feature the decision is based on

    threshold

    The threshold of the proposed decision

    greater

    Is the signal region greater or less than the threshold?

    purity

    The purity of the proposed split

  26. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. var weight: Double

    Permalink

    Weight of the tree (for boosting)

Inherited from AnyRef

Inherited from Any

Ungrouped