public abstract class TreeBasedModel extends MojoModel
DrfModel and GbmModel.
See also: `hex.tree.SharedTreeModel` and `hex.tree.TreeVisitor` classes.MojoModel.MojoReader| Modifier and Type | Field and Description |
|---|---|
protected byte[][] |
_compressed_trees |
protected int |
_ntrees |
_balanceClasses, _category, _defaultThreshold, _modelClassDistrib, _nclasses, _nfeatures, _priorClassDistrib, _reader, _supervised, _uuid_domains, _names, _offsetColumn| Modifier | Constructor and Description |
|---|---|
protected |
TreeBasedModel(MojoModel.MojoReader cr,
java.util.Map<java.lang.String,java.lang.Object> info,
java.lang.String[] columns,
java.lang.String[][] domains) |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getDecisionPath(double leafAssignment) |
protected void |
scoreAllTrees(double[] row,
double[] preds,
int nClassesToScore)
Score all trees and fill in the `preds` array.
|
static double |
scoreTree(byte[] tree,
double[] row,
int nclasses) |
static double |
scoreTree(byte[] tree,
double[] row,
int nclasses,
boolean computeLeafAssignment)
Highly efficient (critical path) tree scoring
Given a tree (in the form of a byte array) and the row of input data, compute either this tree's
predicted value when `computeLeafAssignment` is false, or the the decision path within the tree (but no more
than 64 levels) when `computeLeafAssignment` is true.
|
getModelCategory, getUUID, isSupervised, load, load, nclasses, nfeaturesbitSetContains, correctProbabilities, GBM_rescale, getColIdx, getDomainValues, getDomainValues, getDomainValues, getHeader, getNames, getNumClasses, getNumCols, getNumResponseClasses, getPrediction, getPredsSize, getResponseIdx, getResponseName, GLM_identityInv, GLM_inverseInv, GLM_logInv, GLM_logitInv, GLM_tweedieInv, isAutoEncoder, isClassifier, KMeans_closest, KMeans_distance, KMeans_distance, KMeans_simplex, log_rescale, map, mapEnum, predict, predict, score0, score0, score0, score0, score0protected TreeBasedModel(MojoModel.MojoReader cr, java.util.Map<java.lang.String,java.lang.Object> info, java.lang.String[] columns, java.lang.String[][] domains)
public static double scoreTree(byte[] tree,
double[] row,
int nclasses,
boolean computeLeafAssignment)
public static double scoreTree(byte[] tree,
double[] row,
int nclasses)
public static java.lang.String getDecisionPath(double leafAssignment)
protected void scoreAllTrees(double[] row,
double[] preds,
int nClassesToScore)