Trees | Indices | Help |
|
---|
|
Tree.TreeNode --+ | DecTree.DecTreeNode --+ | QuantTreeNode
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
constructor **Arguments** - parent: the parent of this node in the tree - name: the name of the node - label: the node's label (should be an integer) - data: an optional data field - level: an integer indicating the level of this node in the hierarchy (used for printing) - isTerminal: flags a node as being terminal. This is useful for those times when it's useful to know such things.
|
Recursively classify an example by running it through the tree **Arguments** - example: the example to be classified - appendExamples: if this is nonzero then this node (and all children) will store the example **Returns** the classification of _example_ **NOTE:** In the interest of speed, I don't use accessor functions here. So if you subclass DecTreeNode for your own trees, you'll have to either include ClassifyExample or avoid changing the names of the instance variables this needs.
|
allows tree1 == tree2 **Note** This works recursively
|
allows tree1 < tree2 **Note** This works recursively
|
|
returns a string representation of the tree **Note** this works recursively
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Feb 1 16:13:01 2018 | http://epydoc.sourceforge.net |