The DecisionTree
trait provides common capabilities for all types of decision trees.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Members list
Value members
Concrete methods
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.
Value parameters
- c
-
the child node
- n
-
the parent node
- v
-
the branch value from the parent node
Attributes
Add multiple child nodes to the tree via branchs from node 'n'.
Add multiple child nodes to the tree via branchs from node 'n'.
Value parameters
- n
-
the parent node
- vc
-
the branch value and child node, repeatable
Attributes
Add the root node to the tree.
Add the root node to the tree.
Value parameters
- r
-
the root node of the tree
Attributes
Of all the pruning candidates, find the one with the least gain.
Of all the pruning candidates, find the one with the least gain.
Value parameters
- can
-
the nodes that are canidates for pruning
Attributes
Calculate the entropy of the tree as the weighted average over the list of nodes (defaults to leaves).
Calculate the entropy of the tree as the weighted average over the list of nodes (defaults to leaves).
Value parameters
- nodes
-
the nodes to compute the weighted entropy over
Attributes
Find candidate nodes that may be pruned, i.e., those that are parents of leaf nodes, restricted to those that don't have any children that are themselves internal nodes.
Find candidate nodes that may be pruned, i.e., those that are parents of leaf nodes, restricted to those that don't have any children that are themselves internal nodes.
Attributes
Determine whether all the children of node n are leaf nodes.
Determine whether all the children of node n are leaf nodes.
Value parameters
- n
-
the node in question
Attributes
As part of tree pruning, turn an internal node into a leaf.
As part of tree pruning, turn an internal node into a leaf.
Value parameters
- n
-
the node to turn into a leaf (pruning all nodes below it)
Attributes
Auxilliary predict method facilitating recursion for VectorI
.
Auxilliary predict method facilitating recursion for VectorI
.
Value parameters
- n
-
the current node in the tree
- z
-
the data vector to classify
Attributes
Auxilliary classify method facilitating recursion for VectorD
.
Auxilliary classify method facilitating recursion for VectorD
.
Value parameters
- n
-
the current node in the tree
- z
-
the data vector to classify
Attributes
Print the decision tree using 'prinT' method from Node
class.
Print the decision tree using 'prinT' method from Node
class.