Package mvpa :: Package mappers :: Module pca :: Class PCAMapper
[hide private]
[frames] | no frames]

Class PCAMapper

source code


Mapper to project data onto PCA components estimated from some dataset.

After the mapper has been instantiated, it has to be train first. The PCA mapper only handles 2D data matrices.

Instance Methods [hide private]
 
__init__(self, transpose=False, **kwargs)
Initialize the ProjectionMapper
source code
 
_train(self, dataset)
Determine the projection matrix onto the components from a 2D samples x feature data matrix.
source code

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

Inherited from base.ProjectionMapper (private): _computeRecon, _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('PCAMapper', locals(), ProjectionM...
  var = property(fget= lambda self: self._var, doc= 'Variances p...

Inherited from base.ProjectionMapper: _DEV__doc__, proj, recon

Inherited from base.Mapper: metric, nfeatures

Instance Variables [hide private]

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, transpose=False, **kwargs)
(Constructor)

source code 
Initialize the ProjectionMapper
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__
(inherited documentation)

_train(self, dataset)

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

Class Variable Details [hide private]

__doc__

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

var

Value:
property(fget= lambda self: self._var, doc= 'Variances per component')