Interface QuasiNewtonTrainer.Error

All Superinterfaces:
Serializable
Enclosing class:
QuasiNewtonTrainer

public static interface QuasiNewtonTrainer.Error extends Serializable
Error function to be minimized by trainer. This trainer attempts to solve the problem $$\min_{w} \sum_{i=0}^{n-1} e(y_i, \hat{y}_i)$$ where w are the weights, n is the number of training patterns, \(y_i\) is a training target output and \(\hat{y}_i\) is its forecast value.

This interface defines the function \(e(y, \hat{y})\) and its derivative with respect to its computed value, \(de/d\hat{y}\).

  • Method Summary

    Modifier and Type
    Method
    Description
    double
    error(double[] computed, double[] expected)
    Returns the contribution to the error from a single training output target.
    double[]
    errorGradient(double[] computed, double[] expected)
    Returns the derivative of the error function with respect to the forecast output.
  • Method Details

    • error

      double error(double[] computed, double[] expected)
      Returns the contribution to the error from a single training output target. This is the function \(e(y_i, \hat{y}_i)\).
      Parameters:
      computed - A double representing the computed value.
      expected - A double representing the expected value.
      Returns:
      A double representing the contribution to the error from a single training output target.
    • errorGradient

      double[] errorGradient(double[] computed, double[] expected)
      Returns the derivative of the error function with respect to the forecast output.
      Parameters:
      computed - A double representing the computed value.
      expected - A double representing the expected value.
      Returns:
      A double representing the derivative of the error function with respect to the forecast output.