hex.gbm
Class DTree

java.lang.Object
  extended by water.Iced
      extended by hex.gbm.DTree
All Implemented Interfaces:
java.lang.Cloneable, Freezable

public class DTree
extends Iced

A Decision Tree, laid over a Frame of Vecs, and built distributed. This class defines an explicit Tree structure, as a collection of DTree Nodes. 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 _nids (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.


Nested Class Summary
static class DTree.DecidedNode<UDN extends DTree.UndecidedNode>
           
static class DTree.LeafNode
           
static class DTree.Node
           
static class DTree.Split
           
static class DTree.TreeModel
           
static class DTree.UndecidedNode
           
 
Field Summary
 int depth
           
 int leaves
           
 
Constructor Summary
DTree(java.lang.String[] names, int ncols, char nbins, char nclass, int min_rows)
           
DTree(java.lang.String[] names, int ncols, char nbins, char nclass, int min_rows, long seed)
           
 
Method Summary
 DTree.TreeModel.CompressedTree compress()
           
 DTree.DecidedNode decided(int i)
           
 int len()
           
 void len(int len)
           
 DTree.Node node(int i)
           
 java.util.Random rngForChunk(int cidx)
           
 DTree.Node root()
           
 DTree.UndecidedNode undecided(int i)
           
 
Methods inherited from class water.Iced
clone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFields
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

leaves

public int leaves

depth

public int depth
Constructor Detail

DTree

public DTree(java.lang.String[] names,
             int ncols,
             char nbins,
             char nclass,
             int min_rows)

DTree

public DTree(java.lang.String[] names,
             int ncols,
             char nbins,
             char nclass,
             int min_rows,
             long seed)
Method Detail

root

public final DTree.Node root()

node

public final DTree.Node node(int i)

undecided

public final DTree.UndecidedNode undecided(int i)

decided

public final DTree.DecidedNode decided(int i)

rngForChunk

public java.util.Random rngForChunk(int cidx)

len

public final int len()

len

public final void len(int len)

compress

public DTree.TreeModel.CompressedTree compress()