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
+
)Methods
Parameters: axis : {‘samples’, ‘features’}
fx : callable
fxargs : tuple
Passed as *args to
fx
uattrs : 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 ofuattrs
as 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 bychunks
and then bytargets
within 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
Methods
-
attrfx
¶
-
axis
¶
-
fx
¶
-
fxargs
¶
-
is_trained
= True¶ Indicate that this mapper is always trained.
-
order
¶
-
uattrs
¶