org.apache.ignite.ml.trainers

## Class TrainerTransformers

- java.lang.Object
- - org.apache.ignite.ml.trainers.TrainerTransformers

-     public class TrainerTransformers
      extends Object

  Class containing various trainer transformers.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrainerTransformers()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int[]` | `getMapping(int featuresVectorSize, int maximumFeaturesCntPerMdl, long seed)` Get mapping R^featuresVectorSize -> R^maximumFeaturesCntPerMdl.
    `static <L> BaggedTrainer<L>` | `makeBagged(DatasetTrainer<? extends IgniteModel,L> trainer, int ensembleSize, double subsampleRatio, PredictionsAggregator aggregator)` Add bagging logic to a given trainer.
    `static <M extends IgniteModel<Vector,Double>,L> BaggedTrainer<L>` | `makeBagged(DatasetTrainer<M,L> trainer, int ensembleSize, double subsampleRatio, int featureVectorSize, int featuresSubspaceDim, PredictionsAggregator aggregator)` Add bagging logic to a given trainer.

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

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

- - ### Constructor Detail

    - #### TrainerTransformers

          public TrainerTransformers()

  - ### Method Detail

    - #### makeBagged

          public static <L> BaggedTrainer<L> makeBagged(DatasetTrainer<? extends IgniteModel,L> trainer,
                                                        int ensembleSize,
                                                        double subsampleRatio,
                                                        PredictionsAggregator aggregator)

      Add bagging logic to a given trainer. No features bootstrapping is done.
      Type Parameters:
        `L` - Type of labels.
      Parameters:
        `ensembleSize` - Size of ensemble.
        `subsampleRatio` - Subsample ratio to whole dataset.
        `aggregator` - Aggregator.
      Returns:
        Bagged trainer.

    - #### makeBagged

          public static <M extends IgniteModel<Vector,Double>,L> BaggedTrainer<L> makeBagged(DatasetTrainer<M,L> trainer,
                                                                                             int ensembleSize,
                                                                                             double subsampleRatio,
                                                                                             int featureVectorSize,
                                                                                             int featuresSubspaceDim,
                                                                                             PredictionsAggregator aggregator)

      Add bagging logic to a given trainer.
      Type Parameters:
        `M` - Type of one model in ensemble.
        `L` - Type of labels.
      Parameters:
        `ensembleSize` - Size of ensemble.
        `subsampleRatio` - Subsample ratio to whole dataset.
        `aggregator` - Aggregator.
        `featureVectorSize` - Feature vector dimensionality.
        `featuresSubspaceDim` - Feature subspace dimensionality.
      Returns:
        Bagged trainer.

    - #### getMapping

          public static int[] getMapping(int featuresVectorSize,
                                         int maximumFeaturesCntPerMdl,
                                         long seed)

      Get mapping R^featuresVectorSize -> R^maximumFeaturesCntPerMdl.
      Parameters:
        `featuresVectorSize` - Features vector size (Dimension of initial space).
        `maximumFeaturesCntPerMdl` - Dimension of target space.
        `seed` - Seed.
      Returns:
        Mapping R^featuresVectorSize -> R^maximumFeaturesCntPerMdl.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021