Package mvpa :: Package datasets :: Module maskeddataset :: 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]
 
selectFeaturesByMask(self, mask, plain=False)
Use a mask array to select features from the current set.
source code

Inherited from mappeddataset.MappedDataset: mapForward, mapReverse

Inherited from base.Dataset: __add__, __iadd__, __repr__, __str__, convertFeatureIds2FeatureMask, convertFeatureMask2FeatureIds, getNFeatures, getNSamples, getRandomSamples, idsbychunks, idsbylabels, setSamplesDType, summary

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

    Creators
 
__init__(self, samples=None, mask=None, **kwargs)
Initialize MaskedDataset instance
source code

Inherited from mappeddataset.MappedDataset: selectFeatures

Inherited from base.Dataset: applyMapper, selectSamples

    Mutators

Inherited from base.Dataset: permuteLabels

Class Methods [hide private]

Inherited from base.Dataset (private): _registerAttribute

Class Variables [hide private]
Instance Variables [hide private]

Inherited from base.Dataset (private): _data, _dsattr

Properties [hide private]

Inherited from mappeddataset.MappedDataset: mapper

Inherited from base.Dataset: chunks, idhash, labels, nfeatures, nsamples, samples, samplesperchunk, samplesperlabel, uniquechunks, uniquelabels

Inherited from object: __class__

Method Details [hide private]

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

source code 
Initialize MaskedDataset instance
Parameters:
  • mask - an ndarray where the chosen features equal the non-zero mask elements.
Overrides: object.__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