org.apache.ignite.ml.composition.boosting.convergence.simple

## Class ConvergenceCheckerStub<K,V>

- java.lang.Object
- - org.apache.ignite.ml.composition.boosting.convergence.ConvergenceChecker<K,V>
  - - org.apache.ignite.ml.composition.boosting.convergence.simple.ConvergenceCheckerStub<K,V>

- Type Parameters:
    `K` - Type of a key in upstream data.
    `V` - Type of a value in upstream data.
  All Implemented Interfaces:
    Serializable

      public class ConvergenceCheckerStub<K,V>
      extends ConvergenceChecker<K,V>

  This strategy skip estimating error on dataset step. According to this strategy, training will stop after reaching the maximum number of iterations.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConvergenceCheckerStub(long sampleSize, IgniteFunction externalLbToInternalMapping, Loss loss, DatasetBuilder datasetBuilder, Preprocessor<K,V> preprocessor, double precision)` Creates an instance of ConvergenceCheckerStub.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Double` | `computeMeanErrorOnDataset(Dataset<EmptyContext,? extends FeatureMatrixWithLabelsOnHeapData> dataset, ModelsComposition mdl)` Compute error for given model on learning dataset.
    `boolean` | `isConverged(Dataset<EmptyContext,? extends FeatureMatrixWithLabelsOnHeapData> dataset, ModelsComposition currMdl)` Checks convergency on dataset.
    `boolean` | `isConverged(LearningEnvironmentBuilder envBuilder, DatasetBuilder<K,V> datasetBuilder, ModelsComposition currMdl)` Checks convergency on dataset.

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

      `computeError`

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

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

- - ### Constructor Detail

    - #### ConvergenceCheckerStub

          public ConvergenceCheckerStub(long sampleSize,
                                        IgniteFunction externalLbToInternalMapping,
                                        Loss loss,
                                        DatasetBuilder datasetBuilder,
                                        Preprocessor<K,V> preprocessor,
                                        double precision)

      Creates an instance of ConvergenceCheckerStub.
      Parameters:
        `sampleSize` - Sample size.
        `externalLbToInternalMapping` - External label to internal mapping.
        `loss` - Loss function.
        `datasetBuilder` - Dataset builder.
        `preprocessor` - Preprocessor.
        `precision` - Precision.

  - ### Method Detail

    - #### isConverged

          public boolean isConverged(LearningEnvironmentBuilder envBuilder,
                                     DatasetBuilder<K,V> datasetBuilder,
                                     ModelsComposition currMdl)

      Checks convergency on dataset.
      Overrides:
        `isConverged` in class `ConvergenceChecker<K,V>`
      Parameters:
        `envBuilder` - Learning environment builder.
        `currMdl` - Current model.
      Returns:
        True if GDB is converged.

    - #### isConverged

          public boolean isConverged(Dataset<EmptyContext,? extends FeatureMatrixWithLabelsOnHeapData> dataset,
                                     ModelsComposition currMdl)

      Checks convergency on dataset.
      Overrides:
        `isConverged` in class `ConvergenceChecker<K,V>`
      Parameters:
        `dataset` - Dataset.
        `currMdl` - Current model.
      Returns:
        True if GDB is converged.

    - #### computeMeanErrorOnDataset

          public Double computeMeanErrorOnDataset(Dataset<EmptyContext,? extends FeatureMatrixWithLabelsOnHeapData> dataset,
                                                  ModelsComposition mdl)

      Compute error for given model on learning dataset.
      Specified by:
        `computeMeanErrorOnDataset` in class `ConvergenceChecker<K,V>`
      Parameters:
        `dataset` - Learning dataset.
        `mdl` - Model.
      Returns:
        Error mean value.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020