mvpa2.testing.datasets.HollowSamples

Inheritance diagram of HollowSamples
class mvpa2.testing.datasets.HollowSamples(shape=None, sid=None, fid=None, dtype=<type 'float'>)

Samples container that doesn’t store samples.

The purpose of this class is to provide an object that can be used as samples in a Dataset, without having actual samples. Instead of storing multiple samples it only maintains a IDs for samples and features it pretends to contain.

Using this class in a dataset in conjuction will actual attributes, will yield a lightweight dataset that is compatible with the majority of all mappers and can be used to ‘simulate’ processing by mappers. The class offers acces to the sample and feature IDs via its sid and fid members.

Attributes

samples
shape

Methods

copy([deep])
view() Return itself
Parameters:

shape : 2-tuple or None

Shape of the pretend-sample array (nsamples x nfeatures). Can be left out if both sid and fid are provided.

sid : 1d-array or None

Vector of sample IDs. Can be left out if shape is provided.

fid : 1d-array or None

Vector of feature IDs. Can be left out if shape is provided.

dtype : type or str

Pretend-datatype of the non-existing samples.

Attributes

samples
shape

Methods

copy([deep])
view() Return itself
copy(deep=True)
samples
shape
view()

Return itself