Package gov.nih.mipav.model.algorithms
Class StochasticForests.Tree
java.lang.Object
gov.nih.mipav.model.algorithms.StochasticForests.Tree
- Direct Known Subclasses:
StochasticForests.TreeClassification,StochasticForests.TreeProbability,StochasticForests.TreeRegression,StochasticForests.TreeSurvival
- Enclosing class:
StochasticForests
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected StochasticForests.Dataprotected intprotected booleanprotected StochasticForests.ImportanceModeprotected booleanprotected booleanprotected intprotected doubleprotected intprotected intprotected intprotected intprotected Randomprotected booleanprotected StochasticForests.SplitRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidvoidabstract voidvoidprotected abstract voidvoidvoidprotected abstract voidvoidprotected abstract voidvoidcomputePermutationImportance(Vector<Double> forest_importance, Vector<Double> forest_variance) protected abstract doublevoidprotected abstract voidvoidcreatePossibleSplitVarSubset(Vector<Integer> result) voiddispose()intdropDownSamplePermuted(int permuted_varID, int sampleID, int permuted_sampleID) intvoidvoidinit(StochasticForests.Data data, int mtry, int dependent_varID, int num_samples, long seed, Vector<Integer> deterministic_varIDs, Vector<Integer> split_select_varIDs, Vector<Double> split_select_weights, StochasticForests.ImportanceMode importance_mode, int min_node_size, boolean sample_with_replacement, boolean memory_saving_splitting, StochasticForests.SplitRule splitrule, Vector<Double> case_weights, boolean keep_inbag, Vector<Double> sample_fraction, double alpha, double minprop, boolean holdout, int num_random_splits) voidpermuteAndPredictOobSamples(int permuted_varID, Vector<Integer> permutations) voidpredict(StochasticForests.Data prediction_data, boolean oob_prediction) booleansplitNode(int nodeID) protected abstract booleansplitNodeInternal(int nodeID, Vector<Integer> possible_split_varIDs)
-
Field Details
-
random
-
dependent_varID
protected int dependent_varID -
mtry
protected int mtry -
num_samples
protected int num_samples -
num_samples_oob
protected int num_samples_oob -
min_node_size
protected int min_node_size -
deterministic_varIDs
-
split_select_varIDs
-
split_select_weights
-
case_weights
-
split_varIDs
-
split_values
-
child_nodeIDs
-
sampleIDs
-
oob_sampleIDs
-
holdout
protected boolean holdout -
keep_inbag
protected boolean keep_inbag -
inbag_counts
-
data
-
variable_importance
-
importance_mode
-
prediction_terminal_nodeIDs
-
sample_with_replacement
protected boolean sample_with_replacement -
sample_fraction
-
memory_saving_splitting
protected boolean memory_saving_splitting -
splitrule
-
alpha
protected double alpha -
minprop
protected double minprop -
num_random_splits
protected int num_random_splits
-
-
Constructor Details
-
Tree
public Tree() -
Tree
-
-
Method Details
-
dispose
public void dispose() -
init
public void init(StochasticForests.Data data, int mtry, int dependent_varID, int num_samples, long seed, Vector<Integer> deterministic_varIDs, Vector<Integer> split_select_varIDs, Vector<Double> split_select_weights, StochasticForests.ImportanceMode importance_mode, int min_node_size, boolean sample_with_replacement, boolean memory_saving_splitting, StochasticForests.SplitRule splitrule, Vector<Double> case_weights, boolean keep_inbag, Vector<Double> sample_fraction, double alpha, double minprop, boolean holdout, int num_random_splits) -
grow
-
predict
-
computePermutationImportance
-
appendToFile
-
createPossibleSplitVarSubset
-
splitNode
public boolean splitNode(int nodeID) -
createEmptyNode
public void createEmptyNode() -
dropDownSamplePermuted
public int dropDownSamplePermuted(int permuted_varID, int sampleID, int permuted_sampleID) -
permuteAndPredictOobSamples
-
bootstrap
public void bootstrap() -
bootstrapWeighted
public void bootstrapWeighted() -
bootstrapWithoutReplacement
public void bootstrapWithoutReplacement() -
bootstrapWithoutReplacementWeighted
public void bootstrapWithoutReplacementWeighted() -
allocateMemory
public abstract void allocateMemory() -
appendToFileInternal
-
getChildNodeIDs
-
getSplitValues
-
getSplitVarIDs
-
getOobSampleIDs
-
getNumSamplesOob
public int getNumSamplesOob() -
getInbagCounts
-
splitNodeInternal
-
createEmptyNodeInternal
protected abstract void createEmptyNodeInternal() -
computePredictionAccuracyInternal
protected abstract double computePredictionAccuracyInternal() -
bootstrapClassWise
protected abstract void bootstrapClassWise() -
bootstrapWithoutReplacementClassWise
protected abstract void bootstrapWithoutReplacementClassWise() -
cleanUpInternal
protected abstract void cleanUpInternal()
-