trait DecisionTree extends Error
The DecisionTree
trait provides common capabilities for all types of
decision trees.
- Alphabetic
- By Inheritance
- DecisionTree
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- def add(n: Node, vc: (Int, Node)*): Unit
Add multiple child nodes to the tree via branchs from node 'n'.
Add multiple child nodes to the tree via branchs from node 'n'.
- n
the parent node
- vc
the branch value and child node, repeatable
- def add(n: Node, v: Int, c: Node): Unit
Add child node 'c' to the tree via branch 'v' from node 'n'.
Add child node 'c' to the tree via branch 'v' from node 'n'.
- n
the parent node
- v
the branch value from the parent node
- c
the child node
- def addRoot(r: Node): Unit
Add the root node to the tree.
Add the root node to the tree.
- r
the root node of the tree
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def calcEntropy(nodes: ArrayBuffer[Node] = leaves): Double
Calculate the entropy of the tree as the weighted average over the list of nodes (defualts to leaves).
Calculate the entropy of the tree as the weighted average over the list of nodes (defualts to leaves).
- nodes
the nodes to compute the weighted entropy over
- def classify2(z: VectoD): Int
Given a data vector z, classify it returning the class number (0, ..., k-1) by following a decision path from the root to a leaf.
Given a data vector z, classify it returning the class number (0, ..., k-1) by following a decision path from the root to a leaf. If no branch found, give maximal decision of current node. Return the best class and its name.
- z
the data vector to classify
- def classify2(z: VectoI): Int
Given a data vector z, classify it returning the class number (0, ..., k-1) by following a decision path from the root to a leaf.
Given a data vector z, classify it returning the class number (0, ..., k-1) by following a decision path from the root to a leaf. If no branch found, give maximal decision of current node. Return the best class and its name.
- z
the data vector to classify
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def flaw(method: String, message: String): Unit
- Definition Classes
- Error
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def makeLeaf(n: Node): Unit
As part of tree pruning, turn an internal node into a leaf.
As part of tree pruning, turn an internal node into a leaf.
- n
the node to turn into a leaf (pruning all nodes below it)
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def printTree(): Unit
Print the decision tree using 'prinT' method from
Node
class. - def reset(): Unit
Reset or re-initialize counters, if needed.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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