org.encog.neural.data.union
Class UnionNeuralDataSet

java.lang.Object
  extended by org.encog.neural.data.union.UnionNeuralDataSet
All Implemented Interfaces:
Iterable<NeuralDataPair>, EngineDataSet, NeuralDataSet

public class UnionNeuralDataSet
extends Object
implements NeuralDataSet

A UnionNeuralDataSet is used to create a compound data set that is made up of other data sets. The union set will iterate through all of the date of the subsets in the order that they were added to the union. There are a number of uses for this sort of a dataset. One is for processing extremely large SQL datasets. You can break your query into multiple SQLNeuralDataSet objects and use the UnionNeuralDataSet to cause them to appear as one large dataset. The UnionNeuralDataSet can also be used to combine several different dataset types into one. You must specify the ideal and input sizes. All subsets must adhear to these sizes.


Nested Class Summary
 class UnionNeuralDataSet.UnionIterator
          The iterator used to access the UnionNeuralDataSet.
 
Constructor Summary
UnionNeuralDataSet(int inputSize, int idealSize)
          Construct the union data set.
 
Method Summary
 void add(NeuralData data1)
          Not supported.
 void add(NeuralData inputData, NeuralData idealData)
          Not supported.
 void add(NeuralDataPair inputData)
          Not supported.
 void addSubset(NeuralDataSet set)
          Add a subset.
 void close()
          Close the dataset.
 int getIdealSize()
           
 int getInputSize()
           
 List<NeuralDataSet> getSubsets()
           
 boolean isSupervised()
           
 Iterator<NeuralDataPair> iterator()
          Obtain an iterator to access the collection of data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnionNeuralDataSet

public UnionNeuralDataSet(int inputSize,
                          int idealSize)
Construct the union data set. All subsets must have input and ideal sizes to match the parameters specified to this constructor. For unsupervised training specify 0 for idealSize.

Parameters:
inputSize - The array size of the input data.
idealSize - The array size of the ideal data.
Method Detail

add

public void add(NeuralData data1)
Not supported.

Specified by:
add in interface NeuralDataSet
Parameters:
data1 - Not supported.

add

public void add(NeuralData inputData,
                NeuralData idealData)
Not supported.

Specified by:
add in interface NeuralDataSet
Parameters:
inputData - Not supported.
idealData - Not supported.

add

public void add(NeuralDataPair inputData)
Not supported.

Specified by:
add in interface NeuralDataSet
Parameters:
inputData - Not supported.

addSubset

public void addSubset(NeuralDataSet set)
Add a subset. This method will validate that the input and ideal sizes are correct.

Parameters:
set - The subset to add.

close

public void close()
Close the dataset.

Specified by:
close in interface NeuralDataSet

getIdealSize

public int getIdealSize()
Specified by:
getIdealSize in interface EngineDataSet
Specified by:
getIdealSize in interface NeuralDataSet
Returns:
The array size of the ideal data.

getInputSize

public int getInputSize()
Specified by:
getInputSize in interface EngineDataSet
Specified by:
getInputSize in interface NeuralDataSet
Returns:
The array size of the input data.

getSubsets

public List<NeuralDataSet> getSubsets()
Returns:
A collection of the subsets that make up this union.

iterator

public Iterator<NeuralDataPair> iterator()
Obtain an iterator to access the collection of data.

Specified by:
iterator in interface Iterable<NeuralDataPair>
Returns:
The new iterator.

isSupervised

public boolean isSupervised()
Specified by:
isSupervised in interface EngineDataSet
Specified by:
isSupervised in interface NeuralDataSet
Returns:
True if this training data is supervised.


Copyright © 2011. All Rights Reserved.