Class StochasticForests.Forest

java.lang.Object
gov.nih.mipav.model.algorithms.StochasticForests.Forest
Direct Known Subclasses:
StochasticForests.ForestClassification, StochasticForests.ForestProbability, StochasticForests.ForestRegression, StochasticForests.ForestSurvival
Enclosing class:
StochasticForests

private abstract class StochasticForests.Forest extends Object
  • Field Details

    • random

      protected Random random
    • verbose_out

      protected boolean verbose_out
    • num_trees

      protected int num_trees
    • mtry

      protected int mtry
    • min_node_size

      protected int min_node_size
    • num_variables

      protected int num_variables
    • num_independent_variables

      protected int num_independent_variables
    • seed

      protected long seed
    • dependent_varID

      protected int dependent_varID
    • num_samples

      protected int num_samples
    • prediction_mode

      protected boolean prediction_mode
    • memory_mode

      protected StochasticForests.MemoryMode memory_mode
    • sample_with_replacement

      protected boolean sample_with_replacement
    • memory_saving_splitting

      protected boolean memory_saving_splitting
    • splitrule

      protected StochasticForests.SplitRule splitrule
    • predict_all

      protected boolean predict_all
    • keep_inbag

      protected boolean keep_inbag
    • sample_fraction

      protected Vector<Double> sample_fraction
    • holdout

      protected boolean holdout
    • prediction_type

      protected StochasticForests.PredictionType prediction_type
    • num_random_splits

      protected int num_random_splits
    • alpha

      protected double alpha
    • minprop

      protected double minprop
    • num_threads

      protected int num_threads
    • thread_ranges

      protected Vector<Integer> thread_ranges
    • trees

      protected Vector<StochasticForests.Tree> trees
    • data

      protected StochasticForests.Data data
    • predictions

      protected Vector<Vector<Vector<Double>>> predictions
    • overall_prediction_error

      protected double overall_prediction_error
    • deterministic_varIDs

      protected Vector<Integer> deterministic_varIDs
    • split_select_varIDs

      protected Vector<Integer> split_select_varIDs
    • split_select_weights

      protected Vector<Vector<Double>> split_select_weights
    • case_weights

      protected Vector<Double> case_weights
    • output_prefix

      protected String output_prefix
    • importance_mode

      protected StochasticForests.ImportanceMode importance_mode
    • variable_importance

      protected Vector<Double> variable_importance
    • progress

      protected int progress
    • mutex

      protected final Lock mutex
    • condition_variable

      private final Condition condition_variable
  • Constructor Details

    • Forest

      public Forest()
  • Method Details

    • growInternal

      protected abstract void growInternal()
    • allocatePredictMemory

      protected abstract void allocatePredictMemory()
    • predictInternal

      protected abstract void predictInternal(int sample_idx)
    • computePredictionErrorInternal

      protected abstract void computePredictionErrorInternal()
    • loadFromFileInternal

      protected abstract void loadFromFileInternal(BufferedReader br)
    • initInternal

      public abstract void initInternal(String status_variable_name)
    • writeOutputInternal

      public abstract void writeOutputInternal()
    • writeConfusionFile

      public abstract void writeConfusionFile()
    • writePredictionFile

      public abstract void writePredictionFile()
    • saveToFileInternal

      public abstract void saveToFileInternal(BufferedWriter bw)
    • getChildNodeIDs

      public Vector<Vector<Vector<Integer>>> getChildNodeIDs()
    • getSplitVarIDs

      public Vector<Vector<Integer>> getSplitVarIDs()
    • getSplitValues

      public Vector<Vector<Double>> getSplitValues()
    • getVariableImportance

      public Vector<Double> getVariableImportance()
    • getOverallPredictionError

      public double getOverallPredictionError()
    • getPredictions

      public Vector<Vector<Vector<Double>>> getPredictions()
    • getDependentVarId

      public int getDependentVarId()
    • getNumTrees

      public int getNumTrees()
    • getMtry

      public int getMtry()
    • getMinNodeSize

      public int getMinNodeSize()
    • getNumIndependentVariables

      public int getNumIndependentVariables()
    • getIsOrderedVariable

      public Vector<Boolean> getIsOrderedVariable()
    • getInbagCounts

      public Vector<Vector<Integer>> getInbagCounts()
    • dispose

      public void dispose()
    • initCpp

      public void initCpp(String dependent_variable_name, StochasticForests.MemoryMode memory_mode, String input_file, int mtry, String output_prefix, int num_trees, boolean verbose_out, long seed, int num_threads, String load_forest_filename, StochasticForests.ImportanceMode importance_mode, int min_node_size, String split_select_weights_file, Vector<String> always_split_variable_names, String status_variable_name, boolean sample_with_replacement, Vector<String> unordered_variable_names, boolean memory_saving_splitting, StochasticForests.SplitRule splitrule, String case_weights_file, boolean predict_all, double sample_fraction, double alpha, double minprop, boolean holdout, StochasticForests.PredictionType prediction_type, int num_random_splits)
    • initR

      public void initR(String dependent_variable_name, StochasticForests.Data input_data, int mtry, int num_trees, boolean verbose_out, long seed, int num_threads, StochasticForests.ImportanceMode importance_mode, int min_node_size, Vector<Vector<Double>> split_select_weights, Vector<String> always_split_variable_names, String status_variable_name, boolean prediction_mode, boolean sample_with_replacement, Vector<String> unordered_variable_names, boolean memory_saving_splitting, StochasticForests.SplitRule splitrule, Vector<Double> case_weights, boolean predict_all, boolean keep_inbag, Vector<Double> sample_fraction, double alpha, double minprop, boolean holdout, StochasticForests.PredictionType prediction_type, int num_random_splits)
    • init

      public void init(String dependent_variable_name, StochasticForests.MemoryMode memory_mode, StochasticForests.Data input_data, int mtry, String output_prefix, int num_trees, long seed, int num_threads, StochasticForests.ImportanceMode importance_mode, int min_node_size, String status_variable_name, boolean prediction_mode, boolean sample_with_replacement, Vector<String> unordered_variable_names, boolean memory_saving_splitting, StochasticForests.SplitRule splitrule, boolean predict_all, Vector<Double> sample_fraction, double alpha, double minprop, boolean holdout, StochasticForests.PredictionType prediction_type, int num_random_splits)
    • run

      public void run(boolean verbose)
    • writeOutput

      public void writeOutput()
    • writeImportanceFile

      public void writeImportanceFile()
    • saveToFile

      public void saveToFile()
    • grow

      public void grow()
    • predict

      public void predict()
    • computePredictionError

      public void computePredictionError()
    • computePermutationImportance

      public void computePermutationImportance()
    • loadFromFile

      public void loadFromFile(String filename)
    • setSplitWeightVector

      public void setSplitWeightVector(Vector<Vector<Double>> split_select_weights)
    • setAlwaysSplitVariables

      public void setAlwaysSplitVariables(Vector<String> always_split_variable_names)