Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.ml.data.basic
Class BasicMLSequenceSet

    java.lang.Object
      org.encog.ml.data.basic.BasicMLSequenceSet

All Implemented Interfaces:
  Serializable, Iterable<MLDataPair>, MLDataSet, MLSequenceSet

    public class BasicMLSequenceSet

extends Object
implements Serializable, MLSequenceSet

A basic implementation of the MLSequenceSet.

See Also:
  Serialized Form

Nested Class Summary
`class` | `BasicMLSequenceSet.BasicMLSeqIterator` An iterator to be used with the BasicMLDataSet.

Constructor Summary
`BasicMLSequenceSet()` Default constructor.
`BasicMLSequenceSet(BasicMLSequenceSet other)`
`BasicMLSequenceSet(double[][] input, double[][] ideal)` Construct a data set from an input and ideal array.
`BasicMLSequenceSet(List<MLDataPair> theData)` Construct a data set from an already created list.
`BasicMLSequenceSet(MLDataSet set)` Copy whatever dataset type is specified into a memory dataset.

Method Summary
`void` | `add(MLData theData)` Add a object to the dataset.
`void` | `add(MLData inputData, MLData idealData)` Add a set of input and ideal data to the dataset.
`void` | `add(MLDataPair inputData)` Add a an object to the dataset.
`void` | `add(MLDataSet sequence)` Add a new sequence.
`Object` | `clone()`
`void` | `close()` Close this datasource and release any resources obtained by it, including any iterators created.
`MLDataPair` | `get(int index)`
`int` | `getIdealSize()`
`int` | `getInputSize()`
`void` | `getRecord(long index, MLDataPair pair)` Read an individual record, specified by index, in random order.
`long` | `getRecordCount()` Determine the total number of records in the set.
`MLDataSet` | `getSequence(int i)` Get an individual sequence.
`int` | `getSequenceCount()`
`Collection<MLDataSet>` | `getSequences()`
`boolean` | `isSupervised()`
`Iterator<MLDataPair>` | `iterator()`
`MLDataSet` | `openAdditional()` Opens an additional instance of this dataset.
`int` | `size()`
`void` | `startNewSequence()` Cause a "break" in the data by creating a the beginning of a new sequence.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BasicMLSequenceSet

    public BasicMLSequenceSet()

  Default constructor.

### BasicMLSequenceSet

    public BasicMLSequenceSet(BasicMLSequenceSet other)

### BasicMLSequenceSet

    public BasicMLSequenceSet(double[][] input,
                              double[][] ideal)

  Construct a data set from an input and ideal array.

  Parameters:
    `input` - The input into the machine learning method for training.
    `ideal` - The ideal output for training.

### BasicMLSequenceSet

    public BasicMLSequenceSet(List<MLDataPair> theData)

  Construct a data set from an already created list. Mostly used to duplicate this class.

  Parameters:
    `theData` - The data to use.

### BasicMLSequenceSet

    public BasicMLSequenceSet(MLDataSet set)

  Copy whatever dataset type is specified into a memory dataset.

  Parameters:
    `set` - The dataset to copy.

Method Detail

### add

    public void add(MLData theData)

  Add a object to the dataset. This is used with unsupervised training, as no ideal output is provided. Note: not all implemenations support the add methods.

  Specified by:
    `add` in interface `MLDataSet`
  Parameters:
    `theData` - The data item to be added.

### add

    public void add(MLData inputData,
                    MLData idealData)

  Add a set of input and ideal data to the dataset. This is used with supervised training, as ideal output is provided. Note: not all implementations support the add methods.

  Specified by:
    `add` in interface `MLDataSet`
  Parameters:
    `inputData` - Input data.
    `idealData` - Ideal data.

### add

    public void add(MLDataPair inputData)

  Add a an object to the dataset. This is used with unsupervised training, as no ideal output is provided. Note: not all implementations support the add methods.

  Specified by:
    `add` in interface `MLDataSet`
  Parameters:
    `inputData` - A MLDataPair object that contains both input and ideal data.

### clone

    public final Object clone()

  Overrides:
    `clone` in class `Object`

### close

    public final void close()

  Close this datasource and release any resources obtained by it, including any iterators created.

  Specified by:
    `close` in interface `MLDataSet`

### getIdealSize

    public final int getIdealSize()

  Specified by:
    `getIdealSize` in interface `MLDataSet`
  Returns:
    The size of the input data.

### getInputSize

    public final int getInputSize()

  Specified by:
    `getInputSize` in interface `MLDataSet`
  Returns:
    The size of the input data.

### getRecord

    public final void getRecord(long index,
                                MLDataPair pair)

  Read an individual record, specified by index, in random order.

  Specified by:
    `getRecord` in interface `MLDataSet`
  Parameters:
    `index` - The index to read.
    `pair` - The pair that the record will be copied into.

### getRecordCount

    public final long getRecordCount()

  Determine the total number of records in the set.

  Specified by:
    `getRecordCount` in interface `MLDataSet`
  Returns:
    The total number of records in the set.

### isSupervised

    public final boolean isSupervised()

  Specified by:
    `isSupervised` in interface `MLDataSet`
  Returns:
    True if this is a supervised training set.

### iterator

    public final Iterator<MLDataPair> iterator()

  Specified by:
    `iterator` in interface `Iterable<MLDataPair>`

### openAdditional

    public final MLDataSet openAdditional()

  Opens an additional instance of this dataset.

  Specified by:
    `openAdditional` in interface `MLDataSet`
  Returns:
    The new instance.

### startNewSequence

    public void startNewSequence()

  Description copied from interface: `MLSequenceSet`
  Cause a "break" in the data by creating a the beginning of a new sequence.

  Specified by:
    `startNewSequence` in interface `MLSequenceSet`

### getSequenceCount

    public int getSequenceCount()

  Specified by:
    `getSequenceCount` in interface `MLSequenceSet`
  Returns:
    Get a count of the number of sequences.

### getSequence

    public MLDataSet getSequence(int i)

  Description copied from interface: `MLSequenceSet`
  Get an individual sequence.

  Specified by:
    `getSequence` in interface `MLSequenceSet`
  Parameters:
    `i` - The index of the sequence.
  Returns:
    The sequence.

### getSequences

    public Collection<MLDataSet> getSequences()

  Specified by:
    `getSequences` in interface `MLSequenceSet`
  Returns:
    A list of all of the sequences.

### size

    public int size()

  Specified by:
    `size` in interface `MLDataSet`

### get

    public MLDataPair get(int index)

  Specified by:
    `get` in interface `MLDataSet`

### add

    public void add(MLDataSet sequence)

  Description copied from interface: `MLSequenceSet`
  Add a new sequence.

  Specified by:
    `add` in interface `MLSequenceSet`
  Parameters:
    `sequence` - The sequence to add.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.