Package gov.nih.mipav.model.algorithms
Class StochasticForests.ForestClassification
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.StochasticForests.Forest
-
- gov.nih.mipav.model.algorithms.StochasticForests.ForestClassification
-
- Enclosing class:
- StochasticForests
private class StochasticForests.ForestClassification extends StochasticForests.Forest
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nih.mipav.model.algorithms.StochasticForests.Forest
StochasticForests.Forest.computeTreePermutationImportanceInThread, StochasticForests.Forest.growTreesInThread, StochasticForests.Forest.predictInternalInThread, StochasticForests.Forest.predictTreesInThread, StochasticForests.Forest.showProgress
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Vector<java.lang.Double>class_values(package private) java.util.Vector<java.lang.Double>class_weights(package private) java.util.HashMap<StochasticForests.ValuePair<java.lang.Double,java.lang.Double>,java.lang.Integer>classification_table(package private) java.util.Vector<java.lang.Integer>response_classIDs(package private) java.util.Vector<java.util.Vector<java.lang.Integer>>sampleIDs_per_class-
Fields inherited from class gov.nih.mipav.model.algorithms.StochasticForests.Forest
alpha, case_weights, data, dependent_varID, deterministic_varIDs, holdout, importance_mode, keep_inbag, memory_mode, memory_saving_splitting, min_node_size, minprop, mtry, mutex, num_independent_variables, num_random_splits, num_samples, num_threads, num_trees, num_variables, output_prefix, overall_prediction_error, predict_all, prediction_mode, prediction_type, predictions, progress, random, sample_fraction, sample_with_replacement, seed, split_select_varIDs, split_select_weights, splitrule, thread_ranges, trees, variable_importance, verbose_out
-
-
Constructor Summary
Constructors Constructor Description ForestClassification()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallocatePredictMemory()voidcomputePredictionErrorInternal()java.util.Vector<java.lang.Double>getClassValues()voidgrowInternal()voidinitInternal(java.lang.String status_variable_name)voidloadForest(int dependent_varID, int num_trees, java.util.Vector<java.util.Vector<java.util.Vector<java.lang.Integer>>> forest_child_nodeIDs, java.util.Vector<java.util.Vector<java.lang.Integer>> forest_split_varIDs, java.util.Vector<java.util.Vector<java.lang.Double>> forest_split_values, java.util.Vector<java.lang.Double> class_values, java.util.Vector<java.lang.Boolean> is_ordered_variable)voidloadFromFileInternal(java.io.BufferedReader br)voidpredictInternal(int sample_idx)voidsaveToFileInternal(java.io.BufferedWriter bw)voidsetClassWeights(java.util.Vector<java.lang.Double> class_weights)voidwriteConfusionFile()voidwriteOutputInternal()voidwritePredictionFile()-
Methods inherited from class gov.nih.mipav.model.algorithms.StochasticForests.Forest
computePermutationImportance, computePredictionError, dispose, getChildNodeIDs, getDependentVarId, getInbagCounts, getIsOrderedVariable, getMinNodeSize, getMtry, getNumIndependentVariables, getNumTrees, getOverallPredictionError, getPredictions, getSplitValues, getSplitVarIDs, getVariableImportance, grow, init, initCpp, initR, loadFromFile, predict, run, saveToFile, setAlwaysSplitVariables, setSplitWeightVector, writeImportanceFile, writeOutput
-
-
-
-
Field Detail
-
class_values
java.util.Vector<java.lang.Double> class_values
-
response_classIDs
java.util.Vector<java.lang.Integer> response_classIDs
-
sampleIDs_per_class
java.util.Vector<java.util.Vector<java.lang.Integer>> sampleIDs_per_class
-
class_weights
java.util.Vector<java.lang.Double> class_weights
-
classification_table
java.util.HashMap<StochasticForests.ValuePair<java.lang.Double,java.lang.Double>,java.lang.Integer> classification_table
-
-
Method Detail
-
getClassValues
public java.util.Vector<java.lang.Double> getClassValues()
-
setClassWeights
public void setClassWeights(java.util.Vector<java.lang.Double> class_weights)
-
loadForest
public void loadForest(int dependent_varID, int num_trees, java.util.Vector<java.util.Vector<java.util.Vector<java.lang.Integer>>> forest_child_nodeIDs, java.util.Vector<java.util.Vector<java.lang.Integer>> forest_split_varIDs, java.util.Vector<java.util.Vector<java.lang.Double>> forest_split_values, java.util.Vector<java.lang.Double> class_values, java.util.Vector<java.lang.Boolean> is_ordered_variable)
-
initInternal
public void initInternal(java.lang.String status_variable_name)
- Specified by:
initInternalin classStochasticForests.Forest
-
growInternal
public void growInternal()
- Specified by:
growInternalin classStochasticForests.Forest
-
allocatePredictMemory
public void allocatePredictMemory()
- Specified by:
allocatePredictMemoryin classStochasticForests.Forest
-
predictInternal
public void predictInternal(int sample_idx)
- Specified by:
predictInternalin classStochasticForests.Forest
-
computePredictionErrorInternal
public void computePredictionErrorInternal()
- Specified by:
computePredictionErrorInternalin classStochasticForests.Forest
-
writeOutputInternal
public void writeOutputInternal()
- Specified by:
writeOutputInternalin classStochasticForests.Forest
-
writeConfusionFile
public void writeConfusionFile()
- Specified by:
writeConfusionFilein classStochasticForests.Forest
-
writePredictionFile
public void writePredictionFile()
- Specified by:
writePredictionFilein classStochasticForests.Forest
-
saveToFileInternal
public void saveToFileInternal(java.io.BufferedWriter bw)
- Specified by:
saveToFileInternalin classStochasticForests.Forest
-
loadFromFileInternal
public void loadFromFileInternal(java.io.BufferedReader br)
- Specified by:
loadFromFileInternalin classStochasticForests.Forest
-
-