public class Tree extends H2O.H2OCountedCompleter
Modifier and Type | Class and Description |
---|---|
static class |
Tree.INode |
static class |
Tree.StatType |
static class |
Tree.TreeVisitor<T extends java.lang.Exception>
Abstract visitor class for serialized trees.
|
Modifier and Type | Field and Description |
---|---|
static long |
LTS_INIT |
static long |
LTSS_INIT
Left and right seed initializer number for statistics
|
static int |
ROWS_FORK_TRESHOLD
If the number of rows is higher then given number, fork-join is used to build
subtrees, else subtrees are built sequentially
|
static long |
RTS_INIT
Left and right seed initializer number for subtrees
|
static long |
RTSS_INIT |
Constructor and Description |
---|
Tree(Job job,
Data data,
byte producerId,
int maxDepth,
Tree.StatType stat,
int numSplitFeatures,
long seed,
int treeId,
int exclusiveSplitLimit,
Sampling sampler,
int verbose)
Constructor used to define the specs when building the tree from the top.
|
Modifier and Type | Method and Description |
---|---|
static double |
classify(AutoBuffer ts,
double[] ds,
double badat) |
static short |
classify(AutoBuffer ts,
ValueArray ary,
AutoBuffer databits,
int row,
int[] modelDataMap,
short badData)
Classify this serialized tree - withOUT inflating it to a full tree.
|
int |
classify(Data.Row r) |
void |
compute2() |
static int |
dataId(byte[] bits) |
static long |
depth_leaves(AutoBuffer tbits)
Return (depth << 32)|(leaves), in 1 pass.
|
int |
depth() |
int |
leaves() |
boolean |
onExceptionalCompletion(java.lang.Throwable ex,
jsr166y.CountedCompleter cc)
Performs an action when method
ForkJoinTask.completeExceptionally(java.lang.Throwable)
is invoked or method CountedCompleter.compute() throws an exception, and
this task has not otherwise already completed normally. |
static byte |
producerId(byte[] bits) |
static long |
seed(byte[] bits) |
Key |
toKey() |
java.lang.String |
toString() |
clone, compute, priority
addToPendingCount, compareAndSetPendingCount, complete, exec, getCompleter, getPendingCount, getRawResult, onCompletion, setCompleter, setPendingCount, setRawResult, tryComplete
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
public static final long LTSS_INIT
public static final long RTSS_INIT
public static final long RTS_INIT
public static final long LTS_INIT
public static final int ROWS_FORK_TRESHOLD
public Tree(Job job, Data data, byte producerId, int maxDepth, Tree.StatType stat, int numSplitFeatures, long seed, int treeId, int exclusiveSplitLimit, Sampling sampler, int verbose)
public boolean onExceptionalCompletion(java.lang.Throwable ex, jsr166y.CountedCompleter cc)
jsr166y.CountedCompleter
ForkJoinTask.completeExceptionally(java.lang.Throwable)
is invoked or method CountedCompleter.compute()
throws an exception, and
this task has not otherwise already completed normally. On
entry to this method, this task ForkJoinTask.isCompletedAbnormally()
. The return value of this
method controls further propagation: If true
and this
task has a completer, then this completer is also completed
exceptionally. The default implementation of this method does
nothing except return true
.onExceptionalCompletion
in class H2O.H2OCountedCompleter
ex
- the exceptioncc
- the task invoking this method (which may
be this task itself).public void compute2()
compute2
in class H2O.H2OCountedCompleter
public int classify(Data.Row r)
public java.lang.String toString()
toString
in class java.lang.Object
public int leaves()
public int depth()
public Key toKey()
public static short classify(AutoBuffer ts, ValueArray ary, AutoBuffer databits, int row, int[] modelDataMap, short badData)
public static double classify(AutoBuffer ts, double[] ds, double badat)
public static int dataId(byte[] bits)
public static long seed(byte[] bits)
public static byte producerId(byte[] bits)
public static long depth_leaves(AutoBuffer tbits)