public class TreeSHAP<R,N extends ai.h2o.algos.tree.INode<R>,S extends ai.h2o.algos.tree.INodeStat> extends java.lang.Object implements TreeSHAPPredictor<R>
Modifier and Type | Class and Description |
---|---|
static class |
TreeSHAP.PathPointer |
TreeSHAPPredictor.Workspace
Constructor and Description |
---|
TreeSHAP(N[] nodes) |
TreeSHAP(N[] nodes,
S[] stats,
int rootNodeId) |
Modifier and Type | Method and Description |
---|---|
float[] |
calculateContributions(R feat,
float[] out_contribs) |
float[] |
calculateContributions(R feat,
float[] out_contribs,
int condition,
int condition_feature,
TreeSHAPPredictor.Workspace workspace) |
double[] |
calculateInterventionalContributions(R feat,
R background,
double[] out_contribs,
int[] catOffsets,
boolean expand) |
int |
getWorkspaceSize() |
TreeSHAP.PathPointer |
makeWorkspace() |
public TreeSHAP(N[] nodes)
public float[] calculateContributions(R feat, float[] out_contribs)
calculateContributions
in interface TreeSHAPPredictor<R>
public float[] calculateContributions(R feat, float[] out_contribs, int condition, int condition_feature, TreeSHAPPredictor.Workspace workspace)
calculateContributions
in interface TreeSHAPPredictor<R>
public double[] calculateInterventionalContributions(R feat, R background, double[] out_contribs, int[] catOffsets, boolean expand)
calculateInterventionalContributions
in interface TreeSHAPPredictor<R>
public TreeSHAP.PathPointer makeWorkspace()
makeWorkspace
in interface TreeSHAPPredictor<R>
public int getWorkspaceSize()
getWorkspaceSize
in interface TreeSHAPPredictor<R>