| Trees | Indices | Help |
|
|---|
|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Imports: numpy, random, QuantTree, ID3, entropy, Quantize, range
|
|||
**Arguments**
- examples: a list of lists (nInstances x nVariables+1) of variable
values + instance values
- target: an int
- attrs: a list of ints indicating which variables can be used in the tree
- nPossibleVals: a list containing the number of possible values of
every variable.
- nBoundsPerVar: the number of bounds to include for each variable
- depth: (optional) the current depth in the tree
- maxDepth: (optional) the maximum depth to which the tree
will be grown
**Returns**
a QuantTree.QuantTreeNode with the decision tree
**NOTE:** This code cannot bootstrap (start from nothing...)
use _QuantTreeBoot_ (below) for that.
|
Bootstrapping code for the QuantTree If _initialVar_ is not set, the algorithm will automatically choose the first variable in the tree (the standard greedy approach). Otherwise, _initialVar_ will be used as the first split. |
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Feb 1 16:13:01 2018 | http://epydoc.sourceforge.net |