Multivariate Pattern Analysis in Python |
Inheritance diagram for mvpa.mappers.mask:
Data mapper which applies mask to the data
Bases: mvpa.mappers.base.Mapper
Mapper which uses a binary mask to select “Features”
Initialize MaskMapper
Parameters: |
|
---|
Returns a boolean mask with all features in ouIds selected.
This method works exactly like Mapper.convertOutIds2OutMask(), but the feature mask is finally (reverse) mapped into in-space.
Parameters: | outIds (list or 1d array) – To be selected features ids in out-space. |
---|---|
Return type: | ndarray |
Returns: | All selected features are set to True; False otherwise. |
Returns a boolean mask with all features in outIds selected.
Parameters: | outIds (list or 1d array) – To be selected features ids in out-space. |
---|---|
Return type: | ndarray |
Returns: | All selected features are set to True; False otherwise. |
Listed outIds would be discarded
Map data from the original dataspace into featurespace.
Returns a features coordinate in the original data space for a given feature id.
If this method is called with a list of feature ids it returns a 2d-array where the first axis corresponds the dimensions in ‘In’ dataspace and along the second axis are the coordinates of the features on this dimension (like the output of NumPy.array.nonzero()).
XXX it might become __get_item__ access method
Returns a 2d array where each row contains the coordinate of the feature with the corresponding id.
InShape is a shape of original mask
By default returns a copy of the current mask.
If ‘copy’ is set to False a reference to the mask is returned instead. This shared mask must not be modified!
Translate a feature mask coordinate into a feature ID.
OutSize is a number of non-0 elements in the mask
Reverse map data from featurespace into the original dataspace.
Only listed outIds would remain.
Function assumes that outIds are sorted. In __debug__ mode selectOut would check if obtained IDs are sorted and would warn the user if they are not.
Note
If you feel strongly that you need to remap features internally (ie to allow Ids with mixed order) please contact developers of mvpa to discuss your use case.
The function used to accept a matrix-mask as the input but now it really has to be a list of IDs