org.apache.ignite.ml.composition.boosting.loss

## Class SquaredError

- java.lang.Object
- - org.apache.ignite.ml.composition.boosting.loss.SquaredError

- All Implemented Interfaces:
    Serializable, Loss

      public class SquaredError
      extends Object
      implements Loss

  Represent error function as E(label, modelAnswer) = 1/N * (label - prediction)^2
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SquaredError()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `error(long sampleSize, double lb, double prediction)` Error value for model answer.
    `double` | `gradient(long sampleSize, double lb, double prediction)` Error gradient value for model answer.

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

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

- - ### Constructor Detail

    - #### SquaredError

          public SquaredError()

  - ### Method Detail

    - #### error

          public double error(long sampleSize,
                              double lb,
                              double prediction)

      Error value for model answer.
      Specified by:
        `error` in interface `Loss`
      Parameters:
        `sampleSize` - Sample size.
        `lb` - Label.
        `prediction` - Model answer.
      Returns:
        Error value.

    - #### gradient

          public double gradient(long sampleSize,
                                 double lb,
                                 double prediction)

      Error gradient value for model answer.
      Specified by:
        `gradient` in interface `Loss`
      Parameters:
        `sampleSize` - Sample size.
        `lb` - Label.
        `prediction` - Model answer.
      Returns:
        Error value.

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