Package mvpa :: Package datasets :: Module masked :: Class MaskedDataset
[hide private]
[frames] | no frames]

Class MaskedDataset

source code


Helper class which is MappedDataset with using MaskMapper.

TODO: since what it does is simply some checkes/data_mangling in the constructor, it might be absorbed inside generic MappedDataset

Instance Methods [hide private]
 
__init__(self, samples=None, mask=None, **kwargs)
If samples and mapper arguments are not None the mapper is used to forward-map the samples array and the result is passed to the Dataset constructor.
source code
 
selectFeaturesByMask(self, mask, plain=False)
Use a mask array to select features from the current set.
source code

Inherited from mapped.MappedDataset: mapForward, mapReverse, mapSelfReverse, selectFeatures

Class Variables [hide private]

Inherited from mapped.MappedDataset: O, __doc__, mapper, samples_original

Method Details [hide private]

__init__(self, samples=None, mask=None, **kwargs)
(Constructor)

source code 
If samples and mapper arguments are not None the mapper is used to forward-map the samples array and the result is passed to the Dataset constructor.
Parameters:
  • mask, ndarray - the chosen features equal the non-zero mask elements.
Overrides: mapped.MappedDataset.__init__

selectFeaturesByMask(self, mask, plain=False)

source code 

Use a mask array to select features from the current set.

Returns a new MaskedDataset object with a view of the original pattern array (no copying is performed). The final selection mask only contains features that are present in the current feature mask AND the selection mask passed to this method.

Parameters:
  • mask (ndarray) - input mask
  • plain (bool) - True directs to return a simple Dataset, False -- a new MaskedDataset object