public class TreeSHAPEnsemble<R> extends java.lang.Object implements TreeSHAPPredictor<R>
TreeSHAPPredictor.Workspace
Constructor and Description |
---|
TreeSHAPEnsemble(java.util.Collection<TreeSHAPPredictor<R>> predictors,
float initPred) |
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() |
TreeSHAPPredictor.Workspace |
makeWorkspace() |
public TreeSHAPEnsemble(java.util.Collection<TreeSHAPPredictor<R>> predictors, float initPred)
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 TreeSHAPPredictor.Workspace makeWorkspace()
makeWorkspace
in interface TreeSHAPPredictor<R>
public int getWorkspaceSize()
getWorkspaceSize
in interface TreeSHAPPredictor<R>