The Encog Project

org.encog.util
Class ErrorCalculation

java.lang.Object
  extended by org.encog.util.ErrorCalculation

public class ErrorCalculation
extends java.lang.Object

ErrorCalculation: An implementation of root mean square (RMS) error calculation. This class is used by nearly every neural network in this book to calculate error.


Constructor Summary
ErrorCalculation()
           
 
Method Summary
 double calculateRMS()
          Returns the root mean square error for a complete training set.
 void reset()
          Reset the error accumulation to zero.
 void updateError(double[] actual, double[] ideal)
          Called to update for each number that should be checked.
 void updateError(NeuralData actual, NeuralData ideal)
          Update the error.
 
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

calculateRMS

public double calculateRMS()
Returns the root mean square error for a complete training set.

Returns:
The current error for the neural network.

reset

public void reset()
Reset the error accumulation to zero.


updateError

public void updateError(double[] actual,
                        double[] ideal)
Called to update for each number that should be checked.

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

updateError

public void updateError(NeuralData actual,
                        NeuralData ideal)
Update the error.

Parameters:
actual - The actual values.
ideal - The ideal values.

The Encog Project