Package gov.nih.mipav.model.algorithms
Class StochasticForests.Data
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.StochasticForests.Data
-
- Direct Known Subclasses:
StochasticForests.DataChar
,StochasticForests.DataDouble
,StochasticForests.DataFloat
,StochasticForests.DataSparse
- Enclosing class:
- StochasticForests
private abstract class StochasticForests.Data extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
externalData
(package private) int
i
protected int[]
index_data
protected java.util.Vector<java.lang.Boolean>
is_ordered_variable
protected int
max_num_unique_values
protected java.util.Vector<java.lang.Integer>
no_split_variables
protected int
num_cols
protected int
num_cols_no_snp
protected int
num_rows
protected int
num_rows_rounded
protected java.util.Vector<java.lang.Integer>
permuted_sampleIDs
protected char[]
snp_data
protected java.util.Vector<java.util.Vector<java.lang.Double>>
unique_data_values
protected java.util.Vector<java.lang.String>
variable_names
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addNoSplitVariable(int varID)
void
addSnpData(char[] snp_data, int num_cols_snp)
void
dispose()
abstract double
get(int row, int column)
void
getAllValues(java.util.Vector<java.lang.Double> all_values, java.util.Vector<java.lang.Integer> sampleIDs, int varID)
int
getIndex(int row, int col)
java.util.Vector<java.lang.Boolean>
getIsOrderedVariable()
int
getMaxNumUniqueValues()
void
getMinMaxValues(double[] min, double[] max, java.util.Vector<java.lang.Integer> sampleIDs, int varID)
java.util.Vector<java.lang.Integer>
getNoSplitVariables()
int
getNumCols()
int
getNumRows()
int
getNumUniqueDataValues(int varID)
int
getPermutedSampleID(int sampleID)
double
getUniqueDataValue(int varID, int index)
int
getUnpermutedVarID(int varID)
int
getVariableID(java.lang.String variable_name)
java.util.Vector<java.lang.String>
getVariableNames()
boolean
isOrderedVariable(int varID)
boolean
loadFromFile(java.lang.String filename)
boolean
loadFromFileOther(java.io.BufferedReader input_file, java.lang.String header_line, java.lang.String separator)
void
permuteSampleIDs(java.util.Random random)
abstract void
reserveMemory()
abstract void
set(int col, int row, double value, boolean[] error)
void
setIsOrderedVariable(java.util.Vector<java.lang.Boolean> is_ordered_variable)
void
setIsOrderedVariableString(java.util.Vector<java.lang.String> unordered_variable_names)
void
sort()
-
-
-
Field Detail
-
variable_names
protected java.util.Vector<java.lang.String> variable_names
-
num_rows
protected int num_rows
-
num_rows_rounded
protected int num_rows_rounded
-
num_cols
protected int num_cols
-
snp_data
protected char[] snp_data
-
num_cols_no_snp
protected int num_cols_no_snp
-
externalData
protected boolean externalData
-
index_data
protected int[] index_data
-
unique_data_values
protected java.util.Vector<java.util.Vector<java.lang.Double>> unique_data_values
-
max_num_unique_values
protected int max_num_unique_values
-
i
int i
-
no_split_variables
protected java.util.Vector<java.lang.Integer> no_split_variables
-
is_ordered_variable
protected java.util.Vector<java.lang.Boolean> is_ordered_variable
-
permuted_sampleIDs
protected java.util.Vector<java.lang.Integer> permuted_sampleIDs
-
-
Method Detail
-
dispose
public void dispose()
-
get
public abstract double get(int row, int column)
-
getVariableID
public int getVariableID(java.lang.String variable_name)
-
addSnpData
public void addSnpData(char[] snp_data, int num_cols_snp)
-
loadFromFile
public boolean loadFromFile(java.lang.String filename)
-
loadFromFileOther
public boolean loadFromFileOther(java.io.BufferedReader input_file, java.lang.String header_line, java.lang.String separator)
-
getAllValues
public void getAllValues(java.util.Vector<java.lang.Double> all_values, java.util.Vector<java.lang.Integer> sampleIDs, int varID)
-
getMinMaxValues
public void getMinMaxValues(double[] min, double[] max, java.util.Vector<java.lang.Integer> sampleIDs, int varID)
-
sort
public void sort()
-
reserveMemory
public abstract void reserveMemory()
-
set
public abstract void set(int col, int row, double value, boolean[] error)
-
getUnpermutedVarID
public int getUnpermutedVarID(int varID)
-
getPermutedSampleID
public int getPermutedSampleID(int sampleID)
-
getIndex
public int getIndex(int row, int col)
-
getUniqueDataValue
public double getUniqueDataValue(int varID, int index)
-
getNumUniqueDataValues
public int getNumUniqueDataValues(int varID)
-
getVariableNames
public java.util.Vector<java.lang.String> getVariableNames()
-
getNumCols
public int getNumCols()
-
getNumRows
public int getNumRows()
-
getMaxNumUniqueValues
public int getMaxNumUniqueValues()
-
getNoSplitVariables
public java.util.Vector<java.lang.Integer> getNoSplitVariables()
-
addNoSplitVariable
public void addNoSplitVariable(int varID)
-
getIsOrderedVariable
public java.util.Vector<java.lang.Boolean> getIsOrderedVariable()
-
setIsOrderedVariableString
public void setIsOrderedVariableString(java.util.Vector<java.lang.String> unordered_variable_names)
-
setIsOrderedVariable
public void setIsOrderedVariable(java.util.Vector<java.lang.Boolean> is_ordered_variable)
-
isOrderedVariable
public boolean isOrderedVariable(int varID)
-
permuteSampleIDs
public void permuteSampleIDs(java.util.Random random)
-
-