Package mvpa :: Package mappers :: Module array :: Class DenseArrayMapper
[hide private]
[frames] | no frames]

Class DenseArrayMapper

source code


Mapper for equally spaced dense arrays.
Instance Methods [hide private]
 
__init__(self, mask=None, metric=None, distance_function=cartesianDistance, elementsize=None, shape=None, **kwargs)
Initialize DenseArrayMapper
source code
 
__str__(self)
str(x)
source code

Inherited from mask.MaskMapper: __repr__, convertOutIds2InMask, convertOutIds2OutMask, discardOut, forward, getInId, getInIds, getInSize, getMask, getOutId, getOutSize, isValidInId, reverse, selectOut

Inherited from mask.MaskMapper (private): _initMask

Inherited from base.Mapper: __call__, getMetric, getNeighbor, getNeighborIn, getNeighbors, isValidOutId, setMetric, train

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

Class Variables [hide private]
  __doc__ = enhancedDocString('DenseArrayMapper', locals(), Mask...

Inherited from mask.MaskMapper: mask

Inherited from base.Mapper: metric, nfeatures

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, mask=None, metric=None, distance_function=cartesianDistance, elementsize=None, shape=None, **kwargs)
(Constructor)

source code 
Initialize DenseArrayMapper
Parameters:
  • mask (array) - an array in the original dataspace and its nonzero elements are used to define the features included in the dataset. alternatively, the shape argument can be used to define the array dimensions.
  • metric (Metric) - Corresponding metric for the space. No attempt is made to determine whether a certain metric is reasonable for this mapper. If metric is None -- DescreteMetric is constructed that assumes an equal (1) spacing of all mask elements with a distance_function given as a parameter listed below.
  • distance_function (functor) - Distance function to use as the parameter to DescreteMetric if metric is not specified,
  • elementsize (list or scalar) - Determines spacing within DescreteMetric. If it is given as a scalar, corresponding value is assigned to all dimensions, which are found within mask
  • shape, tuple - The shape of the array to be mapped. If shape is provided instead of mask, a full mask (all True) of the desired shape is constructed. If shape is specified in addition to mask, the provided mask is extended to have the same number of dimensions.
Overrides: object.__init__

Note: parameters elementsize and distance_function are relevant only if metric is None

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

Class Variable Details [hide private]

__doc__

Value:
enhancedDocString('DenseArrayMapper', locals(), MaskMapper)