Table Of Contents

Previous topic

mappers.base

Next topic

mappers.ica

This content refers to the previous stable release of PyMVPA. Please visit www.pymvpa.org for the most recent version of PyMVPA and its documentation.

mappers.boxcar

Module: mappers.boxcar

Inheritance diagram for mvpa.mappers.boxcar:

Data mapper

BoxcarMapper

class mvpa.mappers.boxcar.BoxcarMapper(startpoints, boxlength, offset=0, collision_resolution='mean')

Bases: mvpa.mappers.base.Mapper

Mapper to combine multiple samples into a single sample.

Note

This mapper is somewhat unconventional since it doesn’t preserve number of samples (ie the size of 0-th dimension).

See also

Please refer to the documentation of the base class for more information:

Mapper

Parameters:
  • startpoints (sequence) – Index values along the first axis of ‘data’.
  • boxlength (int) – The number of elements after ‘startpoint’ along the first axis of ‘data’ to be considered for the boxcar.
  • offset (int) – The offset between the provided starting point and the actual start of the boxcar.
  • collision_resolution (‘mean’) – if a sample belonged to multiple output samples, then on reverse, how to resolve the value
forward(data)

Project an ND matrix into N+1D matrix

This method also handles the special of forward mapping a single ‘raw’ sample. Such a sample is extended (by concatenating clones of itself) to cover a full boxcar. This functionality is only availably after a full data array has been forward mapped once.

Return type:array
getInSize()

Returns the number of original samples which were combined.

getOutSize()

Returns the number of output samples.

isValidInId(inId)

Validate if InId is valid

isValidOutId(outId)

Validate if OutId is valid

reverse(data)

Uncombine features back into original space.

Samples which were not touched by forward will get value 0 assigned

selectOut(outIds)

Just complain for now