T - Type of impurity measure.public abstract class DecisionTree<T extends ImpurityMeasure<T>> extends SingleLabelDatasetTrainer<DecisionTreeNode>
DatasetTrainer.EmptyDatasetException| Modifier and Type | Field and Description |
|---|---|
protected boolean |
usingIdx
Use index structure instead of using sorting while learning.
|
envBuilder, environment| Modifier and Type | Method and Description |
|---|---|
<K,V> DecisionTreeNode |
fit(Dataset<EmptyContext,DecisionTreeData> dataset) |
<K,V> DecisionTreeNode |
fitWithInitializedDeployingContext(DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> preprocessor)
Trains model based on the specified data.
|
protected abstract ImpurityMeasureCalculator<T> |
getImpurityMeasureCalculator(Dataset<EmptyContext,DecisionTreeData> dataset)
Returns impurity measure calculator.
|
boolean |
isUpdateable(DecisionTreeNode mdl) |
static String |
printTree(DecisionTreeNode node,
boolean pretty)
Represents DecisionTree as String.
|
protected <K,V> DecisionTreeNode |
updateModel(DecisionTreeNode mdl,
DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> preprocessor)
Trains new model based on dataset because there is no valid approach to update decision trees.
|
DecisionTree<T> |
withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
Changes learning Environment.
|
fit, fit, fit, fit, fit, fit, getLastTrainedModelOrThrowEmptyDatasetException, identityTrainer, learningEnvironment, update, update, update, update, update, withConvertedLabelsprotected boolean usingIdx
public <K,V> DecisionTreeNode fitWithInitializedDeployingContext(DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> preprocessor)
fitWithInitializedDeployingContext in class DatasetTrainer<DecisionTreeNode,Double>K - Type of a key in upstream data.V - Type of a value in upstream data.datasetBuilder - Dataset builder.preprocessor - Extractor of UpstreamEntry into LabeledVector.public boolean isUpdateable(DecisionTreeNode mdl)
isUpdateable in class DatasetTrainer<DecisionTreeNode,Double>mdl - Model.public DecisionTree<T> withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
withEnvironmentBuilder in class DatasetTrainer<DecisionTreeNode,Double>envBuilder - Learning environment builder.protected <K,V> DecisionTreeNode updateModel(DecisionTreeNode mdl, DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> preprocessor)
updateModel in class DatasetTrainer<DecisionTreeNode,Double>K - Type of a key in upstream data.V - Type of a value in upstream data.mdl - Learned model.datasetBuilder - Dataset builder.preprocessor - Mapper from upstream entry to LabeledVector.public <K,V> DecisionTreeNode fit(Dataset<EmptyContext,DecisionTreeData> dataset)
public static String printTree(DecisionTreeNode node, boolean pretty)
node - Decision tree.pretty - Use pretty mode.protected abstract ImpurityMeasureCalculator<T> getImpurityMeasureCalculator(Dataset<EmptyContext,DecisionTreeData> dataset)
dataset - Dataset.
GridGain In-Memory Computing Platform : ver. 8.9.26 Release Date : October 16 2025