### Navigation

- index
- modules |
- next |
- previous |
- PyBrain v0.3 documentation »

# `sequential` – Dataset for Supervised Sequences Regression Training

class `pybrain.datasets.sequential.``SequentialDataSet`(indim, targetdim)

  Bases: `pybrain.datasets.supervised.SupervisedDataSet`

  A SequentialDataSet is like a SupervisedDataSet except that it can keep track of sequences of samples. Indices of a new sequence are stored whenever the method newSequence() is called. The last (open) sequence is considered a normal sequence even though it does not have a following “new sequence” marker.

  `endOfSequence`(index)

    Return True if the marker was moved over the last element of sequence index, False otherwise.

    Mostly used like .endOfData() with while loops.

  `evaluateModuleMSE`(module, averageOver=1, **args)
    Evaluate the predictions of a module on a sequential dataset and return the MSE (potentially average over a number of epochs).
  `getCurrentSequence`()
    Return the current sequence, according to the marker position.
  `getNumSequences`()
    Return the number of sequences. The last (open) sequence is also counted in, even though there is no additional ‘newSequence’ marker.
  `getSequence`(index)

    Returns the sequence given by index.

    A list of arrays is returned for the linked arrays. It is assumed that the last sequence goes until the end of the dataset.

  `getSequenceIterator`(index)
    Return an iterator over the samples of the sequence specified by index.
  `getSequenceLength`(index)
    Return the length of the given sequence. If index is pointing to the last sequence, the sequence is considered to go until the end of the dataset.
  `gotoSequence`(index)
    Move the internal marker to the beginning of sequence index.
  `newSequence`()
    Marks the beginning of a new sequence. this function does nothing if called at the very start of the data set. Otherwise, it starts a new sequence. Empty sequences are not allowed, and an EmptySequenceError exception will be raised.
  `removeSequence`(index)
    Remove the index‘th sequence from the dataset and places the marker to the sample following the removed sequence.
  `splitWithProportion`(proportion=0.5)

    Produce two new datasets, each containing a part of the sequences.

    The first dataset will have a fraction given by proportion of the dataset.

Note

This documentation comprises just a subjective excerpt of available methods. See the source code for additional functionality.

### Navigation

- index
- modules |
- next |
- previous |
- PyBrain v0.3 documentation »