org.neuroph.util
Class NeuralNetworkCODEC
- java.lang.Object
-
- org.neuroph.util.NeuralNetworkCODEC
-
public class NeuralNetworkCODEC extends java.lang.ObjectA CODEC encodes and decodes neural networks, much like the more standard definition of a CODEC encodes and decodes audio/video. This CODEC can encode a neural network to an array of doubles. It can also decode this array of doubles back into a neural network. This is very useful for both simulated annealing and genetic algorithms.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidarray2network(double[] array, NeuralNetwork network)Decode a network from an array.static intdetermineArraySize(NeuralNetwork network)Determine the array size for the given neural network.static voidnetwork2array(NeuralNetwork network, double[] array)Encode a network to an array.
-
-
-
Method Detail
-
network2array
public static void network2array(NeuralNetwork network, double[] array)
Encode a network to an array.- Parameters:
network- The network to encode.
-
array2network
public static void array2network(double[] array, NeuralNetwork network)Decode a network from an array.- Parameters:
array- The array used to decode.network- The network to decode into.
-
determineArraySize
public static int determineArraySize(NeuralNetwork network)
Determine the array size for the given neural network.- Parameters:
network- The neural network to determine for.- Returns:
- The size of the array necessary to hold that network.
-
-
DMelt 3.0 © DataMelt by jWork.ORG