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.


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).
Return the current sequence, according to the marker position.
Return the number of sequences. The last (open) sequence is also counted in, even though there is no additional ‘newSequence’ marker.

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.

Return an iterator over the samples of the sequence specified by 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.
Move the internal marker to the beginning of sequence index.
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.
Remove the index‘th sequence from the dataset and places the marker to the sample following the removed sequence.

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

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


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

Previous topic

importance – Datasets for Weighted Supervised Training

Next topic

supervised – Dataset for Supervised Regression Training

This Page