The Encog Project

org.encog.neural.data.basic
Class BasicNeuralDataPair

java.lang.Object
  extended by org.encog.neural.data.basic.BasicNeuralDataPair
All Implemented Interfaces:
java.io.Serializable, NeuralDataPair

public class BasicNeuralDataPair
extends java.lang.Object
implements NeuralDataPair, java.io.Serializable

A basic implementation of the NeuralDataPair interface. This implementation simply holds and input and ideal NeuralData object. For supervised training both input and ideal should be specified. For unsupervised training the input property should be valid, however the ideal property should contain null.

Author:
jheaton
See Also:
Serialized Form

Constructor Summary
BasicNeuralDataPair(NeuralData input)
          Construct the object with only input.
BasicNeuralDataPair(NeuralData input, NeuralData ideal)
          Construct a BasicNeuralDataPair class with the specified input and ideal values.
 
Method Summary
 NeuralData getIdeal()
          Get the expected results.
 NeuralData getInput()
          Get the input data.
 boolean isSupervised()
          Determine if this data pair is supervised.
 java.lang.String toString()
          Convert the object to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicNeuralDataPair

public BasicNeuralDataPair(NeuralData input)
Construct the object with only input. If this constructor is used, then unsupervised training is being used.

Parameters:
input - The input to the neural network.

BasicNeuralDataPair

public BasicNeuralDataPair(NeuralData input,
                           NeuralData ideal)
Construct a BasicNeuralDataPair class with the specified input and ideal values.

Parameters:
input - The input to the neural network.
ideal - The expected results from the neural network.
Method Detail

getIdeal

public NeuralData getIdeal()
Get the expected results. Returns null if this is unsupervised training.

Specified by:
getIdeal in interface NeuralDataPair
Returns:
Returns the expected results, or null if unsupervised training.

getInput

public NeuralData getInput()
Get the input data.

Specified by:
getInput in interface NeuralDataPair
Returns:
The input data.

isSupervised

public boolean isSupervised()
Determine if this data pair is supervised.

Specified by:
isSupervised in interface NeuralDataPair
Returns:
True if this data pair is supervised.

toString

public java.lang.String toString()
Convert the object to a string.

Overrides:
toString in class java.lang.Object
Returns:
The object as a string.

The Encog Project