![]() |
Multivariate Pattern Analysis in Python |
Support function – little helpers in everyday life
The comprehensive API documentation for this module, including all technical details, is available in the Epydoc-generated API reference for mvpa.misc.support (for developers).
Bases: dict
Simple class to define properties of an event.
The class is basically a dictionary. Any properties can be pass as keyword arguments to the constructor, e.g.:
>>> ev = Event(onset=12, duration=2.45)
Conventions for keys:
Convert onset and duration information into descrete timepoints.
Parameters: |
|
---|---|
Return: | A copy of the original Event with onset and optionally duration replaced by their corresponding descrete timepoint. The new onset will correspond to the timepoint just before or exactly at the original onset. The new duration will be the number of timepoints covering the event from the computed onset timepoint till the timepoint exactly at the end, or just after the event. Note again, that the new values are expressed as #timepoint and not in their original unit! |
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 Event documentation.
Full API documentation of Event in module mvpa.misc.support.
Bases: object
World domination helper: do whatever it is asked and accumulate results
Initialize
Parameters: |
|
---|
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 Harvester documentation.
Full API documentation of Harvester in module mvpa.misc.support.
Bases: object
Initialize
Parameters: |
|
---|
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 HarvesterCall documentation.
Full API documentation of HarvesterCall in module mvpa.misc.support.
Bases: object
Compute some overlap stats from a sequence of binary maps.
When called with a sequence of binary maps (e.g. lists or arrays) the fraction of mask elements that are non-zero in a customizable proportion of the maps is returned. By default this threshold is set to 1.0, i.e. such an element has to be non-zero in all maps.
Three additional maps (same size as original) are computed:
overlap_map: binary map which is non-zero for each overlapping element.
- spread_map: binary map which is non-zero for each element that is
non-zero in any map, but does not exceed the overlap threshold.
ovstats_map: map of float with the raw elementwise fraction of overlap.
All maps are available via class members.
Nothing to be seen here.
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 MapOverlap documentation.
Full API documentation of MapOverlap in module mvpa.misc.support.
Convert history generated by RFE into the array of binary maps
See also
Full API documentation of RFEHistory2maps() in module mvpa.misc.support.
Return a list of break points.
Parameters: |
|
---|---|
Raises: | ValueError |
Returns: | list of indexes for every new set of items |
See also
Full API documentation of getBreakPoints() in module mvpa.misc.support.
Generates a list of lists containing all combinations of elements of data of length ‘n’ without repetitions.
data: list n: integer
This function is adapted from a Java version posted in some forum on the web as an answer to the question ‘How can I generate all possible combinations of length n?’. Unfortunately I cannot remember which forum it was.
See also
Full API documentation of getUniqueLengthNCombinations() in module mvpa.misc.support.
See also
Full API documentation of idhash() in module mvpa.misc.support.
Given a value returns a string where each line is indented
Needed for a cleaner __repr__ output v - arbitrary
See also
Full API documentation of indentDoc() in module mvpa.misc.support.
For given coord check if it is within a specified volume size.
Returns True/False. Assumes that volume coordinates start at 0. No more generalization (arbitrary minimal coord) is done to save on performance
See also
Full API documentation of isInVolume() in module mvpa.misc.support.
Check if listed items are in sorted order.
Parameters: |
|
---|---|
Returns: | True if were sorted. Otherwise False + Warning |
See also
Full API documentation of isSorted() in module mvpa.misc.support.
Use path to file1 as the path to file2 is no absolute path is given for file2
Parameters: |
|
---|
See also
Full API documentation of reuseAbsolutePath() in module mvpa.misc.support.
This function extracts boxcar windows from an array. Such a boxcar is defined by a starting point and the size of the window along the first axis of the array (boxlength). Afterwards a customizable function is applied to each boxcar individually (Default: averaging).
Parameters: |
|
---|---|
Return type: | array (len(startpoints) x data.shape[1:]) |
See also
Full API documentation of transformWithBoxcar() in module mvpa.misc.support.