[pymvpa] ChainMapper
patrik andersson
andersson.j.p at gmail.com
Tue May 3 16:16:48 UTC 2011
Hi,
I have a question regarding mappers.
To follow one of your examples, lets say we have;
In [8]: ds = dataset_wizard(np.ones((5, 4, 3)))
In [9]: ds.a.mapper
Out[9]: FlattenMapper(shape=(4, 3), auto_train=True)
Now we select a subset;
In [10]: ds = ds[:, [1,3,4]]
In [11]: ds.a.mapper
Out[11]: ChainMapper(nodes=[FlattenMapper(shape=(4, 3),
auto_train=True), StaticFeatureSelection(dshape=(12,), oshape=(3,),
slicearg=[1, 3, 4])])
So far, so good.
If we now select a subset of this;
In [12]: ds = ds[:, [0,1]]
In [13]: ds.a.mapper
Out[13]: ChainMapper(nodes=[FlattenMapper(shape=(4, 3),
auto_train=True), StaticFeatureSelection(dshape=(12,), oshape=(3,),
slicearg=array([1, 3]))])
In [14]: ds.shape
Out[14]: (5, 2)
Is the new StaticFeatureSelection not in the ChainMapper, or is it
just a display issue?
Cheers,
Patrik
More information about the Pkg-ExpPsy-PyMVPA
mailing list