Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.mathutil.error
Class ErrorCalculation

    java.lang.Object
      org.encog.mathutil.error.ErrorCalculation

    public class ErrorCalculation

extends Object

Calculate the error of a neural network. Encog currently supports three error calculation modes. See ErrorCalculationMode for more info.

Constructor Summary
`ErrorCalculation()`

Method Summary
`double` | `calculate()` Returns the root mean square error for a complete training set.
`double` | `calculateESS()` Calculate the error with SSE.
`double` | `calculateMSE()` Calculate the error with MSE.
`double` | `calculateRMS()` Calculate the error with RMS.
`static ErrorCalculationMode` | `getMode()` get the error calculation mode, this is static and therefore global to all Enocg training.
`void` | `reset()` Reset the error accumulation to zero.
`static void` | `setMode(ErrorCalculationMode theMode)` Set the error calculation mode, this is static and therefore global to all Enocg training.
`void` | `updateError(double[] actual, double[] ideal, double significance)` Called to update for each number that should be checked.
`void` | `updateError(double actual, double ideal)` Update the error with single values.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ErrorCalculation

    public ErrorCalculation()

Method Detail

### getMode

    public static ErrorCalculationMode getMode()

  get the error calculation mode, this is static and therefore global to all Enocg training. If a particular training method only supports a particular error calculation method, it may override this value. It will not change the value set here, rather the training will occur with its preferred training method. Currently the only training method that does this is Levenberg Marquardt (LMA). The default error mode for Encog is MSE.

  Returns:
    The current mode.

### setMode

    public static void setMode(ErrorCalculationMode theMode)

  Set the error calculation mode, this is static and therefore global to all Enocg training. If a particular training method only supports a particular error calculation method, it may override this value. It will not change the value set here, rather the training will occur with its preferred training method. Currently the only training method that does this is Levenberg Marquardt (LMA).

  Parameters:
    `theMode` - The new mode.

### calculate

    public final double calculate()

  Returns the root mean square error for a complete training set.

  Returns:
    The current error for the neural network.

### calculateMSE

    public final double calculateMSE()

  Calculate the error with MSE.

  Returns:
    The current error for the neural network.

### calculateESS

    public final double calculateESS()

  Calculate the error with SSE.

  Returns:
    The current error for the neural network.

### calculateRMS

    public final double calculateRMS()

  Calculate the error with RMS.

  Returns:
    The current error for the neural network.

### reset

    public final void reset()

  Reset the error accumulation to zero.

### updateError

    public final void updateError(double actual,
                                  double ideal)

  Update the error with single values.

  Parameters:
    `actual` - The actual value.
    `ideal` - The ideal value.

### updateError

    public final void updateError(double[] actual,
                                  double[] ideal,
                                  double significance)

  Called to update for each number that should be checked.

  Parameters:
    `actual` - The actual number.
    `ideal` - The ideal number.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.