org.encog.mathutil.error
Class ErrorCalculation
- java.lang.Object
-
- org.encog.mathutil.error.ErrorCalculation
-
public class ErrorCalculation extends java.lang.ObjectCalculate the error of a neural network. Encog currently supports three error calculation modes. See ErrorCalculationMode for more info.
-
-
Constructor Summary
Constructors Constructor and Description ErrorCalculation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecalculate()Returns the root mean square error for a complete training set.doublecalculateESS()Calculate the error with SSE.doublecalculateLogLoss()doublecalculateMeanNRMSE()doublecalculateMSE()Calculate the error with MSE.doublecalculateRangeNRMSE()doublecalculateRMS()Calculate the error with RMS.static ErrorCalculationModegetMode()get the error calculation mode, this is static and therefore global to all Enocg training.voidreset()Reset the error accumulation to zero.static voidsetMode(ErrorCalculationMode theMode)Set the error calculation mode, this is static and therefore global to all Enocg training.voidupdateError(double[] actual, double[] ideal, double significance)Called to update for each number that should be checked.voidupdateError(double actual, double ideal)Update the error with single values.
-
-
-
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.
-
calculateMeanNRMSE
public final double calculateMeanNRMSE()
-
calculateRangeNRMSE
public final double calculateRangeNRMSE()
-
calculateRMS
public final double calculateRMS()
Calculate the error with RMS.- Returns:
- The current error for the neural network.
-
calculateLogLoss
public final double calculateLogLoss()
-
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.significance- The signficance.
-
-
DMelt 3.0 © DataMelt by jWork.ORG