Package mvpa :: Package mappers :: Module procrustean :: Class ProcrusteanMapper
[hide private]
[frames] | no frames]

Class ProcrusteanMapper

source code


Mapper to project from one space to another using Procrustean transformation (shift + scaling + rotation)
Instance Methods [hide private]
 
__init__(self, scaling=True, reflection=True, reduction=True, oblique=False, oblique_rcond=-1, **kwargs)
Initialize the ProcrusteanMapper
source code
 
__repr__(self)
repr(x)
source code
 
_train(self, source, target=None)
Train Procrustean transformation
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__, 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]
  _DEV__doc__ = """Possibly revert back to inherit from Projecti...
  __doc__ = enhancedDocString('ProcrusteanMapper', locals(), Pro...

Inherited from base.ProjectionMapper: proj, recon

Inherited from base.Mapper: metric, nfeatures

Instance Variables [hide private]
  _scaling
Either to determine the scaling factor
  _scale
Estimated scale

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, scaling=True, reflection=True, reduction=True, oblique=False, oblique_rcond=-1, **kwargs)
(Constructor)

source code 
Initialize the ProcrusteanMapper

:Parameters:
  scaling: bool
    Scale data for the transformation (no longer rigid body
    transformation)
  reflection: bool
    Allow for the data to be reflected (so it might not be a rotation).
    Effective only for non-oblique transformations
  reduction: bool
    If true, it is allowed to map into lower-dimensional
    space. Forward transformation might be suboptimal then and reverse
    transformation might not recover all original variance
  oblique: bool
    Either to allow non-orthogonal transformation -- might heavily overfit
    the data if there is less samples than dimensions. Use `oblique_rcond`.
  oblique_rcond: float
    Cutoff for 'small' singular values to regularize the inverse. See
    :class:`~numpy.linalg.lstsq` for more information.

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__

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__
(inherited documentation)

_train(self, source, target=None)

source code 
Train Procrustean transformation
Parameters:
  • source (dataset or ndarray) - Source space for determining the transformation. If target is None, then labels of 'source' dataset are taken as the target
  • target (dataset or ndarray or Null) - Target space for determining the transformation
Overrides: base.ProjectionMapper._train

Class Variable Details [hide private]

_DEV__doc__

Value:
"""Possibly revert back to inherit from ProjectionMapper"""

__doc__

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