Table Of Contents

Previous topic

mvpa.mappers.base

Next topic

mvpa.mappers.ica

This Page

Quick search

mvpa.mappers.boxcar

Data mapper

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

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).

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

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 BoxcarMapper documentation.

Full API documentation of BoxcarMapper in module mvpa.mappers.boxcar.