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 |
---|---|
int |
_depth |
int |
_leaves |
int |
_len |
double |
_min_rows |
Constructor and Description |
---|
DTree(java.lang.String[] names,
int ncols,
char nbins,
char nbins_cats,
char nclass,
double min_rows) |
DTree(java.lang.String[] names,
int ncols,
char nbins,
char nbins_cats,
char nclass,
double min_rows,
long seed) |
Modifier and Type | Method and Description |
---|---|
CompressedTree |
compress(int tid,
int cls) |
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 final double _min_rows
public int _len
public int _leaves
public int _depth
public DTree(java.lang.String[] names, int ncols, char nbins, char nbins_cats, char nclass, double min_rows)
public DTree(java.lang.String[] names, int ncols, char nbins, char nbins_cats, char nclass, double min_rows, long seed)
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)