The Encog Project

org.encog.neural.networks
Class NetworkCODEC

java.lang.Object
  extended by org.encog.neural.networks.NetworkCODEC

public final class NetworkCODEC
extends java.lang.Object

This class will extract the "long term memory" of a neural network, that is the weights and threshold values into an array. This array can be used to view the neural network as a linear array of doubles. These values can then be modified and copied back into the neural network. This is very useful for simulated annealing, as well as genetic algorithms.

Author:
jheaton

Method Summary
static void arrayToNetwork(java.lang.Double[] array, BasicNetwork network)
          Use an array to populate the memory of the neural network.
static java.lang.Double[] networkToArray(BasicNetwork network)
          Convert to an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

arrayToNetwork

public static void arrayToNetwork(java.lang.Double[] array,
                                  BasicNetwork network)
Use an array to populate the memory of the neural network.

Parameters:
array - An array of doubles.
network - The network to encode.

networkToArray

public static java.lang.Double[] networkToArray(BasicNetwork network)
Convert to an array. This is used with some training algorithms that require that the "memory" of the neuron(the weight and threshold values) be expressed as a linear array.

Parameters:
network - The network to encode.
Returns:
The memory of the neuron.

The Encog Project