Package mvpa :: Package mappers :: Module svd :: Class SVDMapper
[hide private]
[frames] | no frames]

Class SVDMapper

source code


Mapper to project data onto SVD components estimated from some dataset.
Instance Methods [hide private]
 
__init__(self, **kwargs)
Initialize the SVDMapper
source code
 
_train(self, dataset)
Determine the projection matrix onto the SVD components from a 2D samples x feature data matrix.
source code
 
selectOut(self, outIds)
Choose a subset of SVD components (and remove all others).
source code
 
_computeRecon(self)
Since singular vectors are orthonormal, sufficient to take hermitian
source code

Inherited from base.ProjectionMapper: forward, getInSize, getOutSize, reverse, train

Inherited from base.ProjectionMapper (private): _demeanData, _getRecon

Inherited from base.Mapper: __call__, __repr__, getInId, getMetric, getNeighbor, getNeighborIn, getNeighbors, isValidInId, isValidOutId, setMetric

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __doc__ = enhancedDocString('SVDMapper', locals(), ProjectionM...
  sv = property(fget= lambda self: self._sv, doc= "Singular valu...

Inherited from base.ProjectionMapper: _DEV__doc__, proj, recon

Inherited from base.Mapper: metric, nfeatures

Instance Variables [hide private]
  _sv
Singular values of the training matrix.

Inherited from base.ProjectionMapper (private): _demean, _offset_in, _offset_out, _proj, _recon

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 
Initialize the SVDMapper
Parameters:
  • selector, None, |, list - Which components (i.e. columns of the projection matrix) should be used for mapping. If selector is None all components are used. If a list is provided, all list elements are treated as component ids and the respective components are selected (all others are discarded).
  • demean, bool - Either data should be demeaned while computing projections and applied back while doing reverse()
Overrides: object.__init__

Parameters:

**kwargs:

All keyword arguments are passed to the ProjectionMapper constructor.

Note, that for the 'selector' argument this class also supports passing a ElementSelector instance, which will be used to determine the to be selected features, based on the singular values of each component.

_train(self, dataset)

source code 
Determine the projection matrix onto the SVD components from a 2D samples x feature data matrix.
Overrides: base.ProjectionMapper._train

selectOut(self, outIds)

source code 
Choose a subset of SVD components (and remove all others).
Parameters:
  • outIds, sequence - Subset of ids of the current feature in OUT space to keep.
Overrides: base.Mapper.selectOut

_computeRecon(self)

source code 
Since singular vectors are orthonormal, sufficient to take hermitian
Overrides: base.ProjectionMapper._computeRecon

Class Variable Details [hide private]

__doc__

Value:
enhancedDocString('SVDMapper', locals(), ProjectionMapper)

sv

Value:
property(fget= lambda self: self._sv, doc= "Singular values")