Package org.ojalgo.ann
Enum ArtificialNeuralNetwork.Error
- java.lang.Object
-
- java.lang.Enum<ArtificialNeuralNetwork.Error>
-
- org.ojalgo.ann.ArtificialNeuralNetwork.Error
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ArtificialNeuralNetwork.Error>
,java.util.function.BiFunction<java.lang.Double,java.lang.Double,java.lang.Double>
,java.util.function.BinaryOperator<java.lang.Double>
,java.util.function.DoubleBinaryOperator
,BasicFunction
,BinaryFunction<java.lang.Double>
,PrimitiveFunction.Binary
- Enclosing class:
- ArtificialNeuralNetwork
public static enum ArtificialNeuralNetwork.Error extends java.lang.Enum<ArtificialNeuralNetwork.Error> implements PrimitiveFunction.Binary
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ojalgo.function.BasicFunction
BasicFunction.Differentiable<N extends java.lang.Comparable<N>,F extends BasicFunction>, BasicFunction.Integratable<N extends java.lang.Comparable<N>,F extends BasicFunction>, BasicFunction.PlainUnary<T,R>
-
Nested classes/interfaces inherited from interface org.ojalgo.function.BinaryFunction
BinaryFunction.FixedFirst<N extends java.lang.Comparable<N>>, BinaryFunction.FixedSecond<N extends java.lang.Comparable<N>>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CROSS_ENTROPY
Currently this can only be used in combination withArtificialNeuralNetwork.Activator.SOFTMAX
in the final layer.HALF_SQUARED_DIFFERENCE
-
Field Summary
Fields Modifier and Type Field Description private PrimitiveFunction.Binary
myDerivative
private PrimitiveFunction.Binary
myFunction
-
Constructor Summary
Constructors Modifier Constructor Description private
Error(PrimitiveFunction.Binary function, PrimitiveFunction.Binary derivative)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) PrimitiveFunction.Binary
getDerivative()
double
invoke(double target, double current)
double
invoke(Access1D<?> target, Access1D<?> current)
static ArtificialNeuralNetwork.Error
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ArtificialNeuralNetwork.Error[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.ojalgo.function.BinaryFunction
andThen, apply, applyAsDouble, by, by, first, first, invoke, invoke, invoke, invoke, invoke, second, second
-
Methods inherited from interface org.ojalgo.function.PrimitiveFunction.Binary
invoke, invoke
-
-
-
-
Enum Constant Detail
-
CROSS_ENTROPY
public static final ArtificialNeuralNetwork.Error CROSS_ENTROPY
Currently this can only be used in combination withArtificialNeuralNetwork.Activator.SOFTMAX
in the final layer. All other usage will give incorrect network training.
-
HALF_SQUARED_DIFFERENCE
public static final ArtificialNeuralNetwork.Error HALF_SQUARED_DIFFERENCE
-
-
Field Detail
-
myDerivative
private final PrimitiveFunction.Binary myDerivative
-
myFunction
private final PrimitiveFunction.Binary myFunction
-
-
Constructor Detail
-
Error
private Error(PrimitiveFunction.Binary function, PrimitiveFunction.Binary derivative)
-
-
Method Detail
-
values
public static ArtificialNeuralNetwork.Error[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ArtificialNeuralNetwork.Error c : ArtificialNeuralNetwork.Error.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ArtificialNeuralNetwork.Error valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
invoke
public double invoke(double target, double current)
- Specified by:
invoke
in interfaceBinaryFunction<java.lang.Double>
-
getDerivative
PrimitiveFunction.Binary getDerivative()
-
-