org.apache.ignite.ml.tree.randomforest

## Class RandomForestClassifierTrainer

- java.lang.Object
- - org.apache.ignite.ml.trainers.DatasetTrainer<M,Double>
  - - org.apache.ignite.ml.trainers.SingleLabelDatasetTrainer<ModelsComposition>
    - - org.apache.ignite.ml.tree.randomforest.RandomForestTrainer<ObjectHistogram<BootstrappedVector>,GiniHistogram,RandomForestClassifierTrainer>
      - - org.apache.ignite.ml.tree.randomforest.RandomForestClassifierTrainer

-     public class RandomForestClassifierTrainer
      extends RandomForestTrainer<ObjectHistogram<BootstrappedVector>,GiniHistogram,RandomForestClassifierTrainer>

  Classifier trainer based on RandomForest algorithm.

- - ### 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.trainers.DatasetTrainer

      `envBuilder, environment`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RandomForestClassifierTrainer(List<FeatureMeta> meta)` Constructs an instance of RandomForestClassifierTrainer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected ModelsComposition` | `buildComposition(List<TreeRoot> models)` Returns composition of built trees.
    `protected ImpurityHistogramsComputer<GiniHistogram>` | `createImpurityHistogramsComputer()` Creates an instance of Histograms Computer corresponding to RF implementation.
    `protected LeafValuesComputer<ObjectHistogram<BootstrappedVector>>` | `createLeafStatisticsAggregator()` Creates an instance of Leaf Statistics Aggregator corresponding to RF implementation.
    `protected boolean` | `init(Dataset<EmptyContext,BootstrappedDatasetPartition> dataset)` Aggregates all unique labels from dataset and assigns integer id value for each label.
    `protected RandomForestClassifierTrainer` | `instance()`
    `RandomForestClassifierTrainer` | `withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)` Changes learning Environment.

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

      `fitWithInitializedDeployingContext, initTrees, isUpdateable, updateModel, withAmountOfTrees, withFeaturesCountSelectionStrgy, withMaxDepth, withMinImpurityDelta, withNodesToLearnSelectionStrgy, withSeed, withSubSampleSize`

    - ### 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

    - #### RandomForestClassifierTrainer

          public RandomForestClassifierTrainer(List<FeatureMeta> meta)

      Constructs an instance of RandomForestClassifierTrainer.
      Parameters:
        `meta` - Features meta.

  - ### Method Detail

    - #### instance

          protected RandomForestClassifierTrainer instance()

      Specified by:
        `instance` in class `RandomForestTrainer<ObjectHistogram<BootstrappedVector>,GiniHistogram,RandomForestClassifierTrainer>`
      Returns:
        an instance of current object with valid type in according to inheritance.

    - #### init

          protected boolean init(Dataset<EmptyContext,BootstrappedDatasetPartition> dataset)

      Aggregates all unique labels from dataset and assigns integer id value for each label. This id can be used as index in arrays or lists.
      Overrides:
        `init` in class `RandomForestTrainer<ObjectHistogram<BootstrappedVector>,GiniHistogram,RandomForestClassifierTrainer>`
      Parameters:
        `dataset` - Dataset.
      Returns:
        true if initialization was done.

    - #### buildComposition

          protected ModelsComposition buildComposition(List<TreeRoot> models)

      Returns composition of built trees.
      Specified by:
        `buildComposition` in class `RandomForestTrainer<ObjectHistogram<BootstrappedVector>,GiniHistogram,RandomForestClassifierTrainer>`
      Parameters:
        `models` - Models.
      Returns:
        composition of built trees.

    - #### createImpurityHistogramsComputer

          protected ImpurityHistogramsComputer<GiniHistogram> createImpurityHistogramsComputer()

      Creates an instance of Histograms Computer corresponding to RF implementation.
      Specified by:
        `createImpurityHistogramsComputer` in class `RandomForestTrainer<ObjectHistogram<BootstrappedVector>,GiniHistogram,RandomForestClassifierTrainer>`

    - #### createLeafStatisticsAggregator

          protected LeafValuesComputer<ObjectHistogram<BootstrappedVector>> createLeafStatisticsAggregator()

      Creates an instance of Leaf Statistics Aggregator corresponding to RF implementation.
      Specified by:
        `createLeafStatisticsAggregator` in class `RandomForestTrainer<ObjectHistogram<BootstrappedVector>,GiniHistogram,RandomForestClassifierTrainer>`

    - #### withEnvironmentBuilder

          public RandomForestClassifierTrainer withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)

      Changes learning Environment.
      Overrides:
        `withEnvironmentBuilder` in class `DatasetTrainer<ModelsComposition,Double>`
      Parameters:
        `envBuilder` - Learning environment builder.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020