Package gov.nih.mipav.model.algorithms
Class StochasticForests.TreeSurvival
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.StochasticForests.Tree
-
- gov.nih.mipav.model.algorithms.StochasticForests.TreeSurvival
-
- Enclosing class:
- StochasticForests
private class StochasticForests.TreeSurvival extends StochasticForests.Tree
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Vector<java.util.Vector<java.lang.Double>>
chf
private int[]
num_deaths
private int[]
num_samples_at_risk
private int
num_timepoints
private java.util.Vector<java.lang.Integer>
response_timepointIDs
private int
status_varID
private java.util.Vector<java.lang.Double>
unique_timepoints
-
Fields inherited from class gov.nih.mipav.model.algorithms.StochasticForests.Tree
alpha, case_weights, child_nodeIDs, data, dependent_varID, deterministic_varIDs, holdout, importance_mode, inbag_counts, keep_inbag, memory_saving_splitting, min_node_size, minprop, mtry, num_random_splits, num_samples, num_samples_oob, oob_sampleIDs, prediction_terminal_nodeIDs, random, sample_fraction, sample_with_replacement, sampleIDs, split_select_varIDs, split_select_weights, split_values, split_varIDs, splitrule, variable_importance
-
-
Constructor Summary
Constructors Constructor Description TreeSurvival(java.util.Vector<java.lang.Double> unique_timepoints, int status_varID, java.util.Vector<java.lang.Integer> response_timepoints)
TreeSurvival(java.util.Vector<java.util.Vector<java.lang.Integer>> child_nodeIDs, java.util.Vector<java.lang.Integer> split_varIDs, java.util.Vector<java.lang.Double> split_values, java.util.Vector<java.util.Vector<java.lang.Double>> chf, java.util.Vector<java.lang.Double> unique_timepoints, java.util.Vector<java.lang.Integer> response_timepointIDs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addImpurityImportance(int nodeID, int varID, double decrease)
void
allocateMemory()
void
appendToFileInternal(java.io.BufferedWriter bw)
void
bootstrapClassWise()
void
bootstrapWithoutReplacementClassWise()
void
cleanUpInternal()
void
computeAucSplit(double time_k, double time_l, double status_k, double status_l, double value_k, double value_l, int num_splits, java.util.Vector<java.lang.Double> possible_split_values, double[] num_count, double[] num_total)
void
computeChildDeathCounts(int nodeID, int varID, java.util.Vector<java.lang.Double> possible_split_values, int[] num_samples_right_child, int[] delta_samples_at_risk_right_child, int[] num_deaths_right_child, int num_splits)
void
computeDeathCounts(int nodeID)
double
computePredictionAccuracyInternal()
void
computeSurvival(int nodeID)
void
createEmptyNodeInternal()
boolean
findBestSplit(int nodeID, java.util.Vector<java.lang.Integer> possible_split_varIDs)
boolean
findBestSplitExtraTrees(int nodeID, java.util.Vector<java.lang.Integer> possible_split_varIDs)
boolean
findBestSplitMaxstat(int nodeID, java.util.Vector<java.lang.Integer> possible_split_varIDs)
void
findBestSplitValueAUC(int nodeID, int varID, double[] best_value, int[] best_varID, double[] best_auc)
void
findBestSplitValueExtraTrees(int nodeID, int varID, double[] best_value, int[] best_varID, double[] best_logrank)
void
findBestSplitValueExtraTreesUnordered(int nodeID, int varID, double[] best_value, int[] best_varID, double[] best_logrank)
void
findBestSplitValueLogRank(int nodeID, int varID, double[] best_value, int[] best_varID, double[] best_logrank)
void
findBestSplitValueLogRankUnordered(int nodeID, int varID, double[] best_value, int[] best_varID, double[] best_logrank)
java.util.Vector<java.util.Vector<java.lang.Double>>
getChf()
java.util.Vector<java.lang.Double>
getPrediction(int sampleID)
int
getPredictionTerminalNodeID(int sampleID)
boolean
splitNodeInternal(int nodeID, java.util.Vector<java.lang.Integer> possible_split_varIDs)
-
Methods inherited from class gov.nih.mipav.model.algorithms.StochasticForests.Tree
appendToFile, bootstrap, bootstrapWeighted, bootstrapWithoutReplacement, bootstrapWithoutReplacementWeighted, computePermutationImportance, createEmptyNode, createPossibleSplitVarSubset, dispose, dropDownSamplePermuted, getChildNodeIDs, getInbagCounts, getNumSamplesOob, getOobSampleIDs, getSplitValues, getSplitVarIDs, grow, init, permuteAndPredictOobSamples, predict, splitNode
-
-
-
-
Field Detail
-
status_varID
private int status_varID
-
unique_timepoints
private java.util.Vector<java.lang.Double> unique_timepoints
-
num_timepoints
private int num_timepoints
-
response_timepointIDs
private java.util.Vector<java.lang.Integer> response_timepointIDs
-
chf
private java.util.Vector<java.util.Vector<java.lang.Double>> chf
-
num_deaths
private int[] num_deaths
-
num_samples_at_risk
private int[] num_samples_at_risk
-
-
Constructor Detail
-
TreeSurvival
public TreeSurvival(java.util.Vector<java.lang.Double> unique_timepoints, int status_varID, java.util.Vector<java.lang.Integer> response_timepoints)
-
TreeSurvival
public TreeSurvival(java.util.Vector<java.util.Vector<java.lang.Integer>> child_nodeIDs, java.util.Vector<java.lang.Integer> split_varIDs, java.util.Vector<java.lang.Double> split_values, java.util.Vector<java.util.Vector<java.lang.Double>> chf, java.util.Vector<java.lang.Double> unique_timepoints, java.util.Vector<java.lang.Integer> response_timepointIDs)
-
-
Method Detail
-
getChf
public java.util.Vector<java.util.Vector<java.lang.Double>> getChf()
-
getPrediction
public java.util.Vector<java.lang.Double> getPrediction(int sampleID)
-
getPredictionTerminalNodeID
public int getPredictionTerminalNodeID(int sampleID)
-
allocateMemory
public void allocateMemory()
- Specified by:
allocateMemory
in classStochasticForests.Tree
-
appendToFileInternal
public void appendToFileInternal(java.io.BufferedWriter bw)
- Specified by:
appendToFileInternal
in classStochasticForests.Tree
-
createEmptyNodeInternal
public void createEmptyNodeInternal()
- Specified by:
createEmptyNodeInternal
in classStochasticForests.Tree
-
computeSurvival
public void computeSurvival(int nodeID)
-
computePredictionAccuracyInternal
public double computePredictionAccuracyInternal()
- Specified by:
computePredictionAccuracyInternal
in classStochasticForests.Tree
-
splitNodeInternal
public boolean splitNodeInternal(int nodeID, java.util.Vector<java.lang.Integer> possible_split_varIDs)
- Specified by:
splitNodeInternal
in classStochasticForests.Tree
-
findBestSplit
public boolean findBestSplit(int nodeID, java.util.Vector<java.lang.Integer> possible_split_varIDs)
-
findBestSplitMaxstat
public boolean findBestSplitMaxstat(int nodeID, java.util.Vector<java.lang.Integer> possible_split_varIDs)
-
computeDeathCounts
public void computeDeathCounts(int nodeID)
-
computeChildDeathCounts
public void computeChildDeathCounts(int nodeID, int varID, java.util.Vector<java.lang.Double> possible_split_values, int[] num_samples_right_child, int[] delta_samples_at_risk_right_child, int[] num_deaths_right_child, int num_splits)
-
findBestSplitValueLogRank
public void findBestSplitValueLogRank(int nodeID, int varID, double[] best_value, int[] best_varID, double[] best_logrank)
-
findBestSplitValueLogRankUnordered
public void findBestSplitValueLogRankUnordered(int nodeID, int varID, double[] best_value, int[] best_varID, double[] best_logrank)
-
findBestSplitValueAUC
public void findBestSplitValueAUC(int nodeID, int varID, double[] best_value, int[] best_varID, double[] best_auc)
-
computeAucSplit
public void computeAucSplit(double time_k, double time_l, double status_k, double status_l, double value_k, double value_l, int num_splits, java.util.Vector<java.lang.Double> possible_split_values, double[] num_count, double[] num_total)
-
findBestSplitExtraTrees
public boolean findBestSplitExtraTrees(int nodeID, java.util.Vector<java.lang.Integer> possible_split_varIDs)
-
findBestSplitValueExtraTrees
public void findBestSplitValueExtraTrees(int nodeID, int varID, double[] best_value, int[] best_varID, double[] best_logrank)
-
findBestSplitValueExtraTreesUnordered
public void findBestSplitValueExtraTreesUnordered(int nodeID, int varID, double[] best_value, int[] best_varID, double[] best_logrank)
-
addImpurityImportance
public void addImpurityImportance(int nodeID, int varID, double decrease)
-
bootstrapClassWise
public void bootstrapClassWise()
- Specified by:
bootstrapClassWise
in classStochasticForests.Tree
-
bootstrapWithoutReplacementClassWise
public void bootstrapWithoutReplacementClassWise()
- Specified by:
bootstrapWithoutReplacementClassWise
in classStochasticForests.Tree
-
cleanUpInternal
public void cleanUpInternal()
- Specified by:
cleanUpInternal
in classStochasticForests.Tree
-
-