org.apache.ignite.ml.tree

## Class DecisionTreeClassificationTrainer

- java.lang.Object
- - org.apache.ignite.ml.trainers.DatasetTrainer<M,Double>
  - - org.apache.ignite.ml.trainers.SingleLabelDatasetTrainer<DecisionTreeModel>
    - - org.apache.ignite.ml.tree.DecisionTreeTrainer<GiniImpurityMeasure>
      - - org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer

-     public class DecisionTreeClassificationTrainer
      extends DecisionTreeTrainer<GiniImpurityMeasure>

  Decision tree classifier based on distributed decision tree trainer that allows to fit trees using row-partitioned dataset.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.ignite.ml.trainers.DatasetTrainer

      `DatasetTrainer.EmptyDatasetException`

  - ### Field Summary

    - ### Fields inherited from class org.apache.ignite.ml.tree.DecisionTreeTrainer

      `usingIdx`

    - ### Fields inherited from class org.apache.ignite.ml.trainers.DatasetTrainer

      `envBuilder, environment`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DecisionTreeClassificationTrainer()` Constructs a new decision tree classifier with default impurity function compressor and default maxDeep = 5 and minImpurityDecrease = 0.
    `DecisionTreeClassificationTrainer(int maxDeep, double minImpurityDecrease)` Constructs a new decision tree classifier with default impurity function compressor.
    `DecisionTreeClassificationTrainer(int maxDeep, double minImpurityDecrease, StepFunctionCompressor<GiniImpurityMeasure> compressor)` Constructs a new instance of decision tree classifier.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected ImpurityMeasureCalculator<GiniImpurityMeasure>` | `getImpurityMeasureCalculator(Dataset<EmptyContext,DecisionTreeData> dataset)` Returns impurity measure calculator.
    `double` | `getMaxDeep()` Returns a hyper-parameter value.
    `double` | `getMinImpurityDecrease()` Returns a hyper-parameter value.
    `DecisionTreeClassificationTrainer` | `withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)` Changes learning Environment.
    `DecisionTreeClassificationTrainer` | `withMaxDeep(Double maxDeep)` Set up the max deep of decision tree.
    `DecisionTreeClassificationTrainer` | `withMinImpurityDecrease(Double minImpurityDecrease)` Set up the min impurity decrease of decision tree.
    `DecisionTreeClassificationTrainer` | `withUseIndex(boolean useIdx)` Sets useIndex parameter and returns trainer instance.

    - ### Methods inherited from class org.apache.ignite.ml.tree.DecisionTreeTrainer

      `fit, fitWithInitializedDeployingContext, isUpdateable, printTree, updateModel`

    - ### Methods inherited from class org.apache.ignite.ml.trainers.DatasetTrainer

      `fit, fit, fit, fit, fit, fit, getLastTrainedModelOrThrowEmptyDatasetException, identityTrainer, learningEnvironment, update, update, update, update, update, withConvertedLabels`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DecisionTreeClassificationTrainer

          public DecisionTreeClassificationTrainer(int maxDeep,
                                                   double minImpurityDecrease)

      Constructs a new decision tree classifier with default impurity function compressor.
      Parameters:
        `maxDeep` - Max tree deep.
        `minImpurityDecrease` - Min impurity decrease.

    - #### DecisionTreeClassificationTrainer

          public DecisionTreeClassificationTrainer()

      Constructs a new decision tree classifier with default impurity function compressor and default maxDeep = 5 and minImpurityDecrease = 0.

    - #### DecisionTreeClassificationTrainer

          public DecisionTreeClassificationTrainer(int maxDeep,
                                                   double minImpurityDecrease,
                                                   StepFunctionCompressor<GiniImpurityMeasure> compressor)

      Constructs a new instance of decision tree classifier.
      Parameters:
        `maxDeep` - Max tree deep.
        `minImpurityDecrease` - Min impurity decrease.

  - ### Method Detail

    - #### withMaxDeep

          public DecisionTreeClassificationTrainer withMaxDeep(Double maxDeep)

      Set up the max deep of decision tree.
      Parameters:
        `maxDeep` - The parameter value.
      Returns:
        Trainer with new maxDeep parameter value.

    - #### withMinImpurityDecrease

          public DecisionTreeClassificationTrainer withMinImpurityDecrease(Double minImpurityDecrease)

      Set up the min impurity decrease of decision tree.
      Parameters:
        `minImpurityDecrease` - The parameter value.
      Returns:
        Trainer with new minImpurityDecrease parameter value.

    - #### withUseIndex

          public DecisionTreeClassificationTrainer withUseIndex(boolean useIdx)

      Sets useIndex parameter and returns trainer instance.
      Parameters:
        `useIdx` - Use index.
      Returns:
        Decision tree trainer.

    - #### getMaxDeep

          public double getMaxDeep()

      Returns a hyper-parameter value.
      Returns:
        The max deep of tree.

    - #### getMinImpurityDecrease

          public double getMinImpurityDecrease()

      Returns a hyper-parameter value.
      Returns:
        The min impurity decrease.

    - #### getImpurityMeasureCalculator

          protected ImpurityMeasureCalculator<GiniImpurityMeasure> getImpurityMeasureCalculator(Dataset<EmptyContext,DecisionTreeData> dataset)

      Returns impurity measure calculator.
      Specified by:
        `getImpurityMeasureCalculator` in class `DecisionTreeTrainer<GiniImpurityMeasure>`
      Parameters:
        `dataset` - Dataset.
      Returns:
        Impurity measure calculator.

    - #### withEnvironmentBuilder

          public DecisionTreeClassificationTrainer withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)

      Changes learning Environment.
      Overrides:
        `withEnvironmentBuilder` in class `DecisionTreeTrainer<GiniImpurityMeasure>`
      Parameters:
        `envBuilder` - Learning environment builder.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022