public class DTree
extends water.Iced
This class defines an explicit Tree structure, as a collection of DTree
Node
s. The Nodes are numbered with a unique _nid
.
Users need to maintain their own mapping from their data to a _nid
,
where the obvious technique is to have a Vec of _nid
s (ints), one
per each element of the data Vecs.
Each Node
has a DHistogram
, describing summary data
about the rows. The DHistogram requires a pass over the data to be filled
in, and we expect to fill in all rows for Nodes at the same depth at the
same time. i.e., a single pass over the data will fill in all leaf Nodes'
DHistograms at once.
Modifier and Type | Class and Description |
---|---|
static class |
DTree.DecidedNode |
static class |
DTree.LeafNode |
static class |
DTree.Node |
static class |
DTree.Split |
static class |
DTree.UndecidedNode |
Modifier and Type | Field and Description |
---|---|
water.AutoBuffer |
_abAux |
boolean |
_checkConstraintConsistency |
int[] |
_cols |
int |
_depth |
int |
_leaves |
int |
_len |
int |
_mtrys |
int |
_mtrys_per_tree |
SharedTreeModel.SharedTreeParameters |
_parms |
java.util.Random |
_rand |
static int |
NO_PARENT |
Constructor and Description |
---|
DTree(DTree tree)
Copy constructor
|
DTree(water.fvec.Frame fr,
int ncols,
int mtrys,
int mtrys_per_tree,
long seed,
SharedTreeModel.SharedTreeParameters parms) |
Modifier and Type | Method and Description |
---|---|
int |
actual_mtries() |
CompressedTree |
compress(int tid,
int cls,
java.lang.String[][] domains) |
DTree.DecidedNode |
decided(int i) |
static boolean |
isRootNode(DTree.Node n) |
int |
len() |
DTree.Node |
node(int i) |
DTree.Node |
root() |
DTree.UndecidedNode |
undecided(int i) |
public int _len
public int _leaves
public int _depth
public final int _mtrys
public final int _mtrys_per_tree
public final transient java.util.Random _rand
public final transient int[] _cols
public transient SharedTreeModel.SharedTreeParameters _parms
public boolean _checkConstraintConsistency
public static final int NO_PARENT
public transient water.AutoBuffer _abAux
public DTree(water.fvec.Frame fr, int ncols, int mtrys, int mtrys_per_tree, long seed, SharedTreeModel.SharedTreeParameters parms)
public DTree(DTree tree)
tree
- public int actual_mtries()
public final DTree.Node root()
public final DTree.Node node(int i)
public final DTree.UndecidedNode undecided(int i)
public final DTree.DecidedNode decided(int i)
public final int len()
public static boolean isRootNode(DTree.Node n)
public CompressedTree compress(int tid, int cls, java.lang.String[][] domains)