Table Of Contents

Previous topic

mvpa.mappers

Next topic

mvpa.mappers.base

This Page

Quick search

mvpa.mappers.array

Data mapper

The comprehensive API documentation for this module, including all technical details, is available in the Epydoc-generated API reference for mvpa.mappers.array (for developers).

DenseArrayMapper

class mvpa.mappers.array.DenseArrayMapper(mask=None, metric=None, distance_function=<function cartesianDistance at 0x8fa7e9c>, elementsize=None, shape=None, **kwargs)

Bases: mvpa.mappers.mask.MaskMapper

Mapper for equally spaced dense arrays.

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.
Note:

parameters elementsize and distance_function are relevant only if metric is None

See also

Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the DenseArrayMapper documentation.

Full API documentation of DenseArrayMapper in module mvpa.mappers.array.