supervised – Dataset for Supervised Regression Training

class pybrain.datasets.supervised.SupervisedDataSet(inp, target)

Bases: pybrain.datasets.dataset.DataSet

SupervisedDataSets have two fields, one for input and one for the target.

__init__(inp, target)

Initialize an empty supervised dataset.

Pass inp and target to specify the dimensions of the input and target vectors.

Return the length of the linked data fields. If no linked fields exist, return the length of the longest field.
addSample(inp, target)
Add a new sample consisting of input and target.
batches(label, n, permutation=None)

Yield batches of the size of n from the dataset.

A single batch is an array of with dim columns and n rows. The last batch is possibly smaller.

If permutation is given, batches are yielded in the corresponding order.


Clear the dataset.

If linked fields exist, only the linked fields will be deleted unless unlinked is set to True. If no fields are linked, all data will be deleted.

Return a deep copy.
classmethod loadFromFile(filename, format=None)
Return an instance of the class that is saved in the file with the given filename in the specified format.
randomBatches(label, n)
Like .batches(), but the order is random.
classmethod reconstruct(filename)
Read an incomplete data set (option arraysonly) into the given one.
saveToFile(filename, format=None, **kwargs)
Save the object to file given by filename.
Produce two new datasets, the first one containing the fraction given by proportion of the samples.

Previous topic

sequential – Dataset for Supervised Sequences Regression Training

Next topic

svmunit – LIBSVM Support Vector Machine Unit

This Page