org.neuroph.util
Class NeuralNetworkCODEC

java.lang.Object
  extended by org.neuroph.util.NeuralNetworkCODEC

public class NeuralNetworkCODEC
extends Object

A 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.

Author:
Jeff Heaton (http://www.heatonresearch.com)

Method Summary
static void array2network(double[] array, NeuralNetwork network)
          Decode a network from an array.
static int determineArraySize(NeuralNetwork network)
          Determine the array size for the given neural network.
static void network2array(NeuralNetwork network, double[] array)
          Encode a network to an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


Copyright © 2012. All Rights Reserved.