Mapper to pass a dataset on to a set of mappers and combine there output.
Output combination or aggregation is currently done by hstacking or vstacking the resulting datasets.
Notes
Available conditional attributes:
(Conditional attributes enabled by default suffixed with +)
Methods
forward(data) | Map data from input to output space. |
forward1(data) | Wrapper method to map single samples. |
generate(ds) | Yield processing results. |
get_postproc() | Returns the post-processing node or None. |
get_space() | Query the processing space name of this node. |
reset() | |
reverse(data) | Reverse-map data from output back into input space. |
reverse1(data) | Wrapper method to map single samples. |
set_postproc(node) | Assigns a post-processing node |
set_space(name) | Set the processing space name of this node. |
train(ds) | The default implementation calls _pretrain(), _train(), and finally _posttrain(). |
untrain() | Reverts changes in the state of this node caused by previous training |
Parameters : | mappers : list combine_axis : [‘h’, ‘v’] a: {‘unique’,’drop_nonunique’,’uniques’,’all’} or True or False or None (default: None) :
enable_ca : None or list of str
disable_ca : None or list of str
auto_train : bool
force_train : bool
space : str, optional
pass_attr : str, list of str|tuple, optional
postproc : Node instance, optional
descr : str
|
---|
Examples
>>> import numpy as np
>>> from mvpa2.mappers.base import CombinedMapper
>>> from mvpa2.featsel.base import StaticFeatureSelection
>>> from mvpa2.datasets import Dataset
>>> mp = CombinedMapper([StaticFeatureSelection([1,2]),
... StaticFeatureSelection([2,3])],
... combine_axis='h')
>>> mp.is_trained = True
>>> ds = Dataset(np.arange(12).reshape(3,4))
>>> out = mp(ds)
>>> out.samples
array([[ 1, 2, 2, 3],
[ 5, 6, 6, 7],
[ 9, 10, 10, 11]])
Methods
forward(data) | Map data from input to output space. |
forward1(data) | Wrapper method to map single samples. |
generate(ds) | Yield processing results. |
get_postproc() | Returns the post-processing node or None. |
get_space() | Query the processing space name of this node. |
reset() | |
reverse(data) | Reverse-map data from output back into input space. |
reverse1(data) | Wrapper method to map single samples. |
set_postproc(node) | Assigns a post-processing node |
set_space(name) | Set the processing space name of this node. |
train(ds) | The default implementation calls _pretrain(), _train(), and finally _posttrain(). |
untrain() | Reverts changes in the state of this node caused by previous training |