public abstract class SharedTree<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>
extends hex.ModelBuilder<M,P,O>
Modifier and Type | Class and Description |
---|---|
protected class |
SharedTree.Driver |
protected static class |
SharedTree.FrameMap |
Modifier and Type | Field and Description |
---|---|
protected water.fvec.Frame |
_calib |
protected double |
_initialPrediction |
protected M |
_model |
protected int |
_mtry |
protected int |
_mtry_per_tree |
protected int |
_ncols |
protected int |
_ntrees |
protected java.util.Random |
_rand |
protected static boolean |
DEV_DEBUG |
static int |
MAX_NTREES |
Constructor and Description |
---|
SharedTree(P parms) |
SharedTree(P parms,
boolean startup_once) |
SharedTree(P parms,
water.Job job) |
SharedTree(P parms,
water.Key<M> key) |
Modifier and Type | Method and Description |
---|---|
protected DHistogram[][][] |
buildLayer(water.fvec.Frame fr,
int nbins,
int nbins_cats,
DTree[] ktrees,
int[] leafs,
DHistogram[][][] hcs,
boolean build_tree_one_node) |
protected water.fvec.Frame |
calib() |
protected void |
checkMemoryFootPrint() |
protected water.fvec.Chunk |
chk_nids(water.fvec.Chunk[] chks,
int c) |
protected water.fvec.Chunk |
chk_offset(water.fvec.Chunk[] chks) |
protected water.fvec.Chunk |
chk_oobt(water.fvec.Chunk[] chks) |
water.fvec.Chunk |
chk_resp(water.fvec.Chunk[] chks) |
water.fvec.Chunk |
chk_tree(water.fvec.Chunk[] chks,
int c) |
water.fvec.Chunk |
chk_weight(water.fvec.Chunk[] chks) |
protected water.fvec.Chunk |
chk_work(water.fvec.Chunk[] chks,
int c) |
protected boolean |
computePriorClassDistribution() |
static water.util.TwoDimTable |
createModelSummaryTable(int ntrees,
TreeStats treeStats) |
static water.util.TwoDimTable |
createScoringHistoryTable(hex.Model.Output _output,
hex.ScoreKeeper[] _scored_train,
hex.ScoreKeeper[] _scored_valid,
water.Job job,
long[] _training_time_ms) |
void |
cv_computeAndSetOptimalParameters(hex.ModelBuilder<M,P,O>[] cvModelBuilders) |
protected double[] |
data_row(water.fvec.Chunk[] chks,
int row,
double[] data) |
protected boolean |
doScoringAndSaveModel(boolean finalScoring,
boolean oob,
boolean build_tree_one_node) |
protected double |
getInitialValue()
Compute the inital value for a given distribution
|
hex.ToEigenVec |
getToEigenVec() |
boolean |
haveMojo() |
boolean |
havePojo() |
protected int |
idx_nids(int c) |
protected int |
idx_offset() |
protected int |
idx_oobt() |
protected int |
idx_resp() |
protected int |
idx_tree(int c) |
protected int |
idx_weight() |
protected int |
idx_work(int c) |
protected void |
ignoreInvalidColumns(int npredictors,
boolean expensive) |
void |
init(boolean expensive)
Initialize the ModelBuilder, validating all arguments and preparing the
training frame.
|
boolean |
isSupervised() |
protected DTree.DecidedNode |
makeDecided(DTree.UndecidedNode udn,
DHistogram[] hs) |
protected static void |
printGenerateTrees(DTree[] trees) |
protected abstract double |
score1(water.fvec.Chunk[] chks,
double offset,
double weight,
double[] fs,
int row) |
boolean |
scoreZeroTrees() |
boolean |
shouldReorder(water.fvec.Vec v) |
protected water.fvec.Vec |
vec_nids(water.fvec.Frame fr,
int c) |
protected water.fvec.Vec |
vec_offset(water.fvec.Frame fr) |
protected water.fvec.Vec |
vec_oobt(water.fvec.Frame fr) |
protected water.fvec.Vec |
vec_resp(water.fvec.Frame fr) |
protected water.fvec.Vec |
vec_tree(water.fvec.Frame fr,
int c) |
protected water.fvec.Vec |
vec_weight(water.fvec.Frame fr) |
protected water.fvec.Vec |
vec_work(water.fvec.Frame fr,
int c) |
algoName, algos, builderVisibility, can_build, checkDistributions, clearInitState, clearValidationErrors, computeCrossValidation, cv_AssignFold, cv_buildModels, cv_mainModelScores, cv_makeFramesAndBuilders, cv_makeWeights, cv_scoreCVModels, defaultKey, desiredChunks, dest, error_count, error, get, hasFoldCol, hasOffsetCol, hasWeightCol, hide, ignoreBadColumns, ignoreConstColumns, ignoreStringColumns, info, init_adaptFrameToTrain, isClassifier, isStopped, javaName, logMe, make, message, nclasses, nFoldCV, nFoldWork, nModelsInParallel, numSpecialCols, paramName, rebalance, response, schemaDirectory, separateFeatureVecs, setTrain, specialColNames, stop_requested, timeout, train, trainModel, trainModelImpl, trainModelNested, valid, validationErrors, vresponse, warn
protected static final boolean DEV_DEBUG
protected int _mtry
protected int _mtry_per_tree
public static final int MAX_NTREES
protected int _ntrees
protected M extends SharedTreeModel<M,P,O> _model
protected int _ncols
protected double _initialPrediction
protected java.util.Random _rand
protected transient water.fvec.Frame _calib
public SharedTree(P parms)
public SharedTree(P parms, water.Job job)
public SharedTree(P parms, boolean startup_once)
public boolean shouldReorder(water.fvec.Vec v)
shouldReorder
in class hex.ModelBuilder<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>
protected final water.fvec.Frame calib()
public boolean isSupervised()
isSupervised
in class hex.ModelBuilder<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>
public boolean haveMojo()
haveMojo
in class hex.ModelBuilder<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>
public boolean havePojo()
havePojo
in class hex.ModelBuilder<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>
public boolean scoreZeroTrees()
protected boolean computePriorClassDistribution()
computePriorClassDistribution
in class hex.ModelBuilder<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>
public hex.ToEigenVec getToEigenVec()
getToEigenVec
in class hex.ModelBuilder<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>
protected void ignoreInvalidColumns(int npredictors, boolean expensive)
ignoreInvalidColumns
in class hex.ModelBuilder<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>
public void init(boolean expensive)
init
in class hex.ModelBuilder<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>
protected DHistogram[][][] buildLayer(water.fvec.Frame fr, int nbins, int nbins_cats, DTree[] ktrees, int[] leafs, DHistogram[][][] hcs, boolean build_tree_one_node)
protected int idx_weight()
protected int idx_offset()
protected int idx_resp()
protected int idx_tree(int c)
protected int idx_work(int c)
protected int idx_nids(int c)
protected int idx_oobt()
public water.fvec.Chunk chk_weight(water.fvec.Chunk[] chks)
protected water.fvec.Chunk chk_offset(water.fvec.Chunk[] chks)
public water.fvec.Chunk chk_resp(water.fvec.Chunk[] chks)
public water.fvec.Chunk chk_tree(water.fvec.Chunk[] chks, int c)
protected water.fvec.Chunk chk_work(water.fvec.Chunk[] chks, int c)
protected water.fvec.Chunk chk_nids(water.fvec.Chunk[] chks, int c)
protected water.fvec.Chunk chk_oobt(water.fvec.Chunk[] chks)
protected final water.fvec.Vec vec_weight(water.fvec.Frame fr)
protected final water.fvec.Vec vec_offset(water.fvec.Frame fr)
protected final water.fvec.Vec vec_resp(water.fvec.Frame fr)
protected final water.fvec.Vec vec_tree(water.fvec.Frame fr, int c)
protected final water.fvec.Vec vec_work(water.fvec.Frame fr, int c)
protected final water.fvec.Vec vec_nids(water.fvec.Frame fr, int c)
protected final water.fvec.Vec vec_oobt(water.fvec.Frame fr)
protected double[] data_row(water.fvec.Chunk[] chks, int row, double[] data)
protected DTree.DecidedNode makeDecided(DTree.UndecidedNode udn, DHistogram[] hs)
protected abstract double score1(water.fvec.Chunk[] chks, double offset, double weight, double[] fs, int row)
protected final boolean doScoringAndSaveModel(boolean finalScoring, boolean oob, boolean build_tree_one_node)
protected static void printGenerateTrees(DTree[] trees)
public static water.util.TwoDimTable createScoringHistoryTable(hex.Model.Output _output, hex.ScoreKeeper[] _scored_train, hex.ScoreKeeper[] _scored_valid, water.Job job, long[] _training_time_ms)
public static water.util.TwoDimTable createModelSummaryTable(int ntrees, TreeStats treeStats)
protected void checkMemoryFootPrint()
checkMemoryFootPrint
in class hex.ModelBuilder<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>
protected double getInitialValue()
public void cv_computeAndSetOptimalParameters(hex.ModelBuilder<M,P,O>[] cvModelBuilders)
cv_computeAndSetOptimalParameters
in class hex.ModelBuilder<M extends SharedTreeModel<M,P,O>,P extends SharedTreeModel.SharedTreeParameters,O extends SharedTreeModel.SharedTreeOutput>