org.apache.ignite.ml.composition.boosting

## Class GDBBinaryClassifierTrainer

- java.lang.Object
- - org.apache.ignite.ml.trainers.DatasetTrainer<GDBModel,Double>
  - - org.apache.ignite.ml.composition.boosting.GDBTrainer
    - - org.apache.ignite.ml.composition.boosting.GDBBinaryClassifierTrainer

- Direct Known Subclasses:
    GDBBinaryClassifierOnTreesTrainer

      public abstract class GDBBinaryClassifierTrainer
      extends GDBTrainer

  Trainer for binary classifier using Gradient Boosting. As preparing stage this algorithm learn labels in dataset and create mapping dataset labels to 0 and 1. This algorithm uses gradient of Logarithmic Loss metric [LogLoss] by default in each step of learning.

- - ### 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.composition.boosting.GDBTrainer

      `checkConvergenceStgyFactory, loss`

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

      `envBuilder, environment`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GDBBinaryClassifierTrainer(double gradStepSize, Integer cntOfIterations)` Constructs instance of GDBBinaryClassifierTrainer.
    `GDBBinaryClassifierTrainer(double gradStepSize, Integer cntOfIterations, Loss loss)` Constructs instance of GDBBinaryClassifierTrainer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected double` | `externalLabelToInternal(double x)` Maps external representation of label to internal.
    `protected double` | `internalLabelToExternal(double indent)` Maps internal representation of label to external.
    `protected <V,K> boolean` | `learnLabels(DatasetBuilder<K,V> builder, Preprocessor<K,V> preprocessor)` Defines unique labels in dataset if need (useful in case of classification).
    `GDBBinaryClassifierOnTreesTrainer` | `withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)` Changes learning Environment.

    - ### Methods inherited from class org.apache.ignite.ml.composition.boosting.GDBTrainer

      `buildBaseModelTrainer, computeInitialValue, fitWithInitializedDeployingContext, getLearningStrategy, isUpdateable, updateModel, withCheckConvergenceStgyFactory`

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

    - #### GDBBinaryClassifierTrainer

          public GDBBinaryClassifierTrainer(double gradStepSize,
                                            Integer cntOfIterations)

      Constructs instance of GDBBinaryClassifierTrainer.
      Parameters:
        `gradStepSize` - Grad step size.
        `cntOfIterations` - Count of learning iterations.

    - #### GDBBinaryClassifierTrainer

          public GDBBinaryClassifierTrainer(double gradStepSize,
                                            Integer cntOfIterations,
                                            Loss loss)

      Constructs instance of GDBBinaryClassifierTrainer.
      Parameters:
        `gradStepSize` - Grad step size.
        `cntOfIterations` - Count of learning iterations.
        `loss` - Loss function.

  - ### Method Detail

    - #### learnLabels

          protected <V,K> boolean learnLabels(DatasetBuilder<K,V> builder,
                                              Preprocessor<K,V> preprocessor)

      Defines unique labels in dataset if need (useful in case of classification).
      Specified by:
        `learnLabels` in class `GDBTrainer`
      Parameters:
        `builder` - Dataset builder.
        `preprocessor` - Upstream preprocessor.
      Returns:
        True if labels learning was successful.

    - #### externalLabelToInternal

          protected double externalLabelToInternal(double x)

      Maps external representation of label to internal.
      Specified by:
        `externalLabelToInternal` in class `GDBTrainer`
      Parameters:
        `x` - Label value.

    - #### internalLabelToExternal

          protected double internalLabelToExternal(double indent)

      Maps internal representation of label to external.
      Specified by:
        `internalLabelToExternal` in class `GDBTrainer`
      Parameters:
        `indent` - Label value.

    - #### withEnvironmentBuilder

          public GDBBinaryClassifierOnTreesTrainer withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)

      Changes learning Environment.
      Overrides:
        `withEnvironmentBuilder` in class `GDBTrainer`
      Parameters:
        `envBuilder` - Learning environment builder.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022