mvpa2.mappers.fx.FxMapper¶
-
class
mvpa2.mappers.fx.FxMapper(axis, fx, fxargs=None, uattrs=None, attrfx='merge', order='uattrs')¶ Apply a custom transformation to (groups of) samples or features.
Notes
Available conditional attributes:
calling_time+: Noneraw_results: Nonetrained_dataset: Nonetrained_nsamples+: Nonetrained_targets+: Nonetraining_time+: None
(Conditional attributes enabled by default suffixed with
+)Attributes
attrfxauto_trainWhether the Learner performs automatic trainingwhen called untrained. axisdescrDescription of the object if any force_trainWhether the Learner enforces training upon everycalled. fxfxargsorderpass_attrWhich attributes of the dataset or self.ca to pass into result dataset upon call postprocNode to perform post-processing of results spaceProcessing space name of this node uattrsMethods
Parameters: axis : {‘samples’, ‘features’}
fx : callable
fxargs : tuple
Passed as *args to
fxuattrs : list
List of attribute names to consider. All possible combinations of unique elements of these attributes are used to determine the sample groups to operate on.
attrfx : callable
Functor that is called with each sample attribute elements matching the respective samples group. By default the unique value is determined. If the content of the attribute is not uniform for a samples group a unique string representation is created. If
None, attributes are not altered.order : {‘uattrs’, ‘occurrence’, None}
If which order groups should be merged together. If
None(default before 2.3.1), the order is imposed only by the order ofuattrsas keys in the dictionary, thus can vary from run to run. If'occurrence', groups will be ordered by the first occurrence of group samples in original dataset. If'uattrs', groups will be sorted by the values of uattrs with follow-up attr having higher importance for ordering (e .g.uattrs=['targets', 'chunks']would order groups first bychunksand then bytargetswithin each chunk).enable_ca : None or list of str
Names of the conditional attributes which should be enabled in addition to the default ones
disable_ca : None or list of str
Names of the conditional attributes which should be disabled
Attributes
attrfxauto_trainWhether the Learner performs automatic trainingwhen called untrained. axisdescrDescription of the object if any force_trainWhether the Learner enforces training upon everycalled. fxfxargsorderpass_attrWhich attributes of the dataset or self.ca to pass into result dataset upon call postprocNode to perform post-processing of results spaceProcessing space name of this node uattrsMethods
-
attrfx¶
-
axis¶
-
fx¶
-
fxargs¶
-
is_trained= True¶ Indicate that this mapper is always trained.
-
order¶
-
uattrs¶

