org.neuroph.contrib.learning
Class CrossEntropyError
- java.lang.Object
-
- org.neuroph.contrib.learning.CrossEntropyError
-
- All Implemented Interfaces:
- java.io.Serializable, ErrorFunction
public class CrossEntropyError extends java.lang.Object implements ErrorFunction, java.io.Serializable
Special error function which is recommended to be used in classification models- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description CrossEntropyError()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]addPatternError(double[] predictedOutput, double[] targetOutput)Calculates and adds pattern error for the given predicted and target output vector and adds it to total error.doublegetTotalError()Return total network errorvoidreset()Sets total error and pattern count to zero.
-
-
-
Method Detail
-
getTotalError
public double getTotalError()
Description copied from interface:ErrorFunctionReturn total network error- Specified by:
getTotalErrorin interfaceErrorFunction- Returns:
- total network error
-
reset
public void reset()
Description copied from interface:ErrorFunctionSets total error and pattern count to zero.- Specified by:
resetin interfaceErrorFunction
-
addPatternError
public double[] addPatternError(double[] predictedOutput, double[] targetOutput)Description copied from interface:ErrorFunctionCalculates and adds pattern error for the given predicted and target output vector and adds it to total error.- Specified by:
addPatternErrorin interfaceErrorFunction- Parameters:
predictedOutput- actual network outputtargetOutput- target/desired output- Returns:
- returns pattern error vector
-
-
DMelt 3.0 © DataMelt by jWork.ORG