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 void
allocatePredictMemory()
void
computePredictionErrorInternal()
java.util.Vector<java.lang.Double>
getClassValues()
void
growInternal()
void
initInternal(java.lang.String status_variable_name)
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)
void
loadFromFileInternal(java.io.BufferedReader br)
void
predictInternal(int sample_idx)
void
saveToFileInternal(java.io.BufferedWriter bw)
void
setClassWeights(java.util.Vector<java.lang.Double> class_weights)
void
writeConfusionFile()
void
writeOutputInternal()
void
writePredictionFile()
-
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:
initInternal
in classStochasticForests.Forest
-
growInternal
public void growInternal()
- Specified by:
growInternal
in classStochasticForests.Forest
-
allocatePredictMemory
public void allocatePredictMemory()
- Specified by:
allocatePredictMemory
in classStochasticForests.Forest
-
predictInternal
public void predictInternal(int sample_idx)
- Specified by:
predictInternal
in classStochasticForests.Forest
-
computePredictionErrorInternal
public void computePredictionErrorInternal()
- Specified by:
computePredictionErrorInternal
in classStochasticForests.Forest
-
writeOutputInternal
public void writeOutputInternal()
- Specified by:
writeOutputInternal
in classStochasticForests.Forest
-
writeConfusionFile
public void writeConfusionFile()
- Specified by:
writeConfusionFile
in classStochasticForests.Forest
-
writePredictionFile
public void writePredictionFile()
- Specified by:
writePredictionFile
in classStochasticForests.Forest
-
saveToFileInternal
public void saveToFileInternal(java.io.BufferedWriter bw)
- Specified by:
saveToFileInternal
in classStochasticForests.Forest
-
loadFromFileInternal
public void loadFromFileInternal(java.io.BufferedReader br)
- Specified by:
loadFromFileInternal
in classStochasticForests.Forest
-
-