public class DecisionTreeData extends FeatureMatrixWithLabelsOnHeapData implements AutoCloseable
data
of the containing matrix of features and vector of labels stored in heap
with index on features.Constructor and Description |
---|
DecisionTreeData(double[][] features,
double[] labels,
boolean buildIdx)
Constructs a new instance of decision tree data.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
TreeDataIndex |
createIndexByFilter(int depth,
TreeFilter filter)
Builds index in according to current tree depth and cached indexes in upper levels.
|
DecisionTreeData |
filter(TreeFilter filter)
Filters objects and returns only data that passed filter.
|
double[] |
getCopiedOriginalLabels() |
void |
setCopiedOriginalLabels(double[] copiedOriginalLabels) |
void |
sort(int col)
Sorts data by specified column in ascending order.
|
getFeatures, getLabels
public DecisionTreeData(double[][] features, double[] labels, boolean buildIdx)
features
- Matrix with features.labels
- Vector with labels.buildIdx
- Build index.public DecisionTreeData filter(TreeFilter filter)
filter
- Filter.public void sort(int col)
col
- Column.public double[] getCopiedOriginalLabels()
public void setCopiedOriginalLabels(double[] copiedOriginalLabels)
public void close()
close
in interface AutoCloseable
close
in class FeatureMatrixWithLabelsOnHeapData
public TreeDataIndex createIndexByFilter(int depth, TreeFilter filter)
depth
- Tree Depth.filter
- Filter.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024