Class StochasticForests.Forest

    • Field Detail

      • random

        protected java.util.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
      • sample_with_replacement

        protected boolean sample_with_replacement
      • memory_saving_splitting

        protected boolean memory_saving_splitting
      • predict_all

        protected boolean predict_all
      • keep_inbag

        protected boolean keep_inbag
      • sample_fraction

        protected java.util.Vector<java.lang.Double> sample_fraction
      • holdout

        protected boolean holdout
      • 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 java.util.Vector<java.lang.Integer> thread_ranges
      • predictions

        protected java.util.Vector<java.util.Vector<java.util.Vector<java.lang.Double>>> predictions
      • overall_prediction_error

        protected double overall_prediction_error
      • deterministic_varIDs

        protected java.util.Vector<java.lang.Integer> deterministic_varIDs
      • split_select_varIDs

        protected java.util.Vector<java.lang.Integer> split_select_varIDs
      • split_select_weights

        protected java.util.Vector<java.util.Vector<java.lang.Double>> split_select_weights
      • case_weights

        protected java.util.Vector<java.lang.Double> case_weights
      • output_prefix

        protected java.lang.String output_prefix
      • variable_importance

        protected java.util.Vector<java.lang.Double> variable_importance
      • progress

        protected int progress
      • mutex

        protected final java.util.concurrent.locks.Lock mutex
      • condition_variable

        private final java.util.concurrent.locks.Condition condition_variable
    • Constructor Detail

      • Forest

        public Forest()
    • Method Detail

      • 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​(java.io.BufferedReader br)
      • initInternal

        public abstract void initInternal​(java.lang.String status_variable_name)
      • writeOutputInternal

        public abstract void writeOutputInternal()
      • writeConfusionFile

        public abstract void writeConfusionFile()
      • writePredictionFile

        public abstract void writePredictionFile()
      • saveToFileInternal

        public abstract void saveToFileInternal​(java.io.BufferedWriter bw)
      • getChildNodeIDs

        public java.util.Vector<java.util.Vector<java.util.Vector<java.lang.Integer>>> getChildNodeIDs()
      • getSplitVarIDs

        public java.util.Vector<java.util.Vector<java.lang.Integer>> getSplitVarIDs()
      • getSplitValues

        public java.util.Vector<java.util.Vector<java.lang.Double>> getSplitValues()
      • getVariableImportance

        public java.util.Vector<java.lang.Double> getVariableImportance()
      • getOverallPredictionError

        public double getOverallPredictionError()
      • getPredictions

        public java.util.Vector<java.util.Vector<java.util.Vector<java.lang.Double>>> getPredictions()
      • getDependentVarId

        public int getDependentVarId()
      • getNumTrees

        public int getNumTrees()
      • getMtry

        public int getMtry()
      • getMinNodeSize

        public int getMinNodeSize()
      • getNumIndependentVariables

        public int getNumIndependentVariables()
      • getIsOrderedVariable

        public java.util.Vector<java.lang.Boolean> getIsOrderedVariable()
      • getInbagCounts

        public java.util.Vector<java.util.Vector<java.lang.Integer>> getInbagCounts()
      • dispose

        public void dispose()
      • initCpp

        public void initCpp​(java.lang.String dependent_variable_name,
                            StochasticForests.MemoryMode memory_mode,
                            java.lang.String input_file,
                            int mtry,
                            java.lang.String output_prefix,
                            int num_trees,
                            boolean verbose_out,
                            long seed,
                            int num_threads,
                            java.lang.String load_forest_filename,
                            StochasticForests.ImportanceMode importance_mode,
                            int min_node_size,
                            java.lang.String split_select_weights_file,
                            java.util.Vector<java.lang.String> always_split_variable_names,
                            java.lang.String status_variable_name,
                            boolean sample_with_replacement,
                            java.util.Vector<java.lang.String> unordered_variable_names,
                            boolean memory_saving_splitting,
                            StochasticForests.SplitRule splitrule,
                            java.lang.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​(java.lang.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,
                          java.util.Vector<java.util.Vector<java.lang.Double>> split_select_weights,
                          java.util.Vector<java.lang.String> always_split_variable_names,
                          java.lang.String status_variable_name,
                          boolean prediction_mode,
                          boolean sample_with_replacement,
                          java.util.Vector<java.lang.String> unordered_variable_names,
                          boolean memory_saving_splitting,
                          StochasticForests.SplitRule splitrule,
                          java.util.Vector<java.lang.Double> case_weights,
                          boolean predict_all,
                          boolean keep_inbag,
                          java.util.Vector<java.lang.Double> sample_fraction,
                          double alpha,
                          double minprop,
                          boolean holdout,
                          StochasticForests.PredictionType prediction_type,
                          int num_random_splits)
      • init

        public void init​(java.lang.String dependent_variable_name,
                         StochasticForests.MemoryMode memory_mode,
                         StochasticForests.Data input_data,
                         int mtry,
                         java.lang.String output_prefix,
                         int num_trees,
                         long seed,
                         int num_threads,
                         StochasticForests.ImportanceMode importance_mode,
                         int min_node_size,
                         java.lang.String status_variable_name,
                         boolean prediction_mode,
                         boolean sample_with_replacement,
                         java.util.Vector<java.lang.String> unordered_variable_names,
                         boolean memory_saving_splitting,
                         StochasticForests.SplitRule splitrule,
                         boolean predict_all,
                         java.util.Vector<java.lang.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​(java.lang.String filename)
      • setSplitWeightVector

        public void setSplitWeightVector​(java.util.Vector<java.util.Vector<java.lang.Double>> split_select_weights)
      • setAlwaysSplitVariables

        public void setAlwaysSplitVariables​(java.util.Vector<java.lang.String> always_split_variable_names)