org.apache.ignite.ml.composition.predictionsaggregator

## Class WeightedPredictionsAggregator

- java.lang.Object
- - org.apache.ignite.ml.composition.predictionsaggregator.WeightedPredictionsAggregator

- All Implemented Interfaces:
    Serializable, Function<double[],Double>, PredictionsAggregator, IgniteFunction<double[],Double>

      public final class WeightedPredictionsAggregator
      extends Object
      implements PredictionsAggregator

  Predictions aggregator returning weighted plus of predictions. result(p1, ..., pn) = bias + p1*w1 + ... + pn*wn
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WeightedPredictionsAggregator()`
    `WeightedPredictionsAggregator(double[] weights)` Constructs WeightedPredictionsAggregator instance.
    `WeightedPredictionsAggregator(double[] weights, double bias)` Constructs WeightedPredictionsAggregator instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Double` | `apply(double[] answers)`
    `double` | `getBias()`
    `double[]` | `getWeights()`
    `String` | `toString()`
    `String` | `toString(boolean pretty)` Represents aggregator as String.

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

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

    - ### Methods inherited from interface org.apache.ignite.ml.math.functions.IgniteFunction

      `andThen, constant, identity`

    - ### Methods inherited from interface java.util.function.Function

      `andThen, compose`

- - ### Constructor Detail

    - #### WeightedPredictionsAggregator

          public WeightedPredictionsAggregator()

    - #### WeightedPredictionsAggregator

          public WeightedPredictionsAggregator(double[] weights)

      Constructs WeightedPredictionsAggregator instance.
      Parameters:
        `weights` - Weights.

    - #### WeightedPredictionsAggregator

          public WeightedPredictionsAggregator(double[] weights,
                                               double bias)

      Constructs WeightedPredictionsAggregator instance.
      Parameters:
        `weights` - Weights.
        `bias` - Bias.

  - ### Method Detail

    - #### apply

          public Double apply(double[] answers)

      Specified by:
        `apply` in interface `Function<double[],Double>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toString

          public String toString(boolean pretty)

      Represents aggregator as String.
      Specified by:
        `toString` in interface `PredictionsAggregator`
      Parameters:
        `pretty` - Use pretty mode.

    - #### getWeights

          public double[] getWeights()

    - #### getBias

          public double getBias()

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