[pymvpa] Recovering original image dimensions after remove_invariant_features

Shane Hoversten shanusmagnus at gmail.com
Fri Oct 24 16:50:55 UTC 2014


Hi folks -


> np.sum(ds.samples * ds.samples, axis=1) look like? any 0s or NaNs ?
>

Nope.


> you could also share may be your ds.summary()
>

These are the values before I remove invariant features:

##
*In [13]:* print(nh.summary())

Dataset: 192x27650 at float32, <sa:
absConTgts,days,runs,scrambled_runs,targets,time_coords,time_indices>, <fa:
voxel_indices>, <a: imghdr,imgtype,mapper,voxel_dim,voxel_eldim> stats:
mean=-0.0608565 std=7.55835 var=57.1287 min=-1189.06 max=617.153
Sequence statistics for 192 entries from set ['hss', 'nov']
Counter-balance table for orders up to 2:
Targets/Order O1 | O2 |
hss: 94 2 | 92 4 |
nov: 1 94 | 2 92 |
Correlations: min=-1 max=1 mean=-0.0052 sum(abs)=95

*In [14]*: nh.a.mapper
*Out[14]:* ChainMapper(nodes=[FlattenMapper(shape=(73, 87, 73),
auto_train=True, space='voxel_indices'),
StaticFeatureSelection(dshape=(463623,), slicearg=memmap([False, False,
False, ..., False, False, False], dtype=bool))])
##

Here's the same values after removing invariant features.  (There's still
no 0s or NANs in the np.sum() you described.)

##
*In [19]*: print(dsinv.summary())

Dataset: 192x26152 at float32, <sa:
absConTgts,days,runs,scrambled_runs,targets,time_coords,time_indices>, <fa:
voxel_indices>, <a: imghdr,imgtype,mapper,voxel_dim,voxel_eldim> stats:
mean=-0.064343 std=7.77971 var=60.5239 min=-1189.06 max=617.153

Sequence statistics for 192 entries from set ['hss', 'nov']
Counter-balance table for orders up to 2:
Targets/Order O1 | O2 |
hss: 94 2 | 92 4 |
nov: 1 94 | 2 92 |
Correlations: min=-1 max=1 mean=-0.0052 sum(abs)=95

*In [20]*: dsinv.a.mapper
*Out[20]*: ChainMapper(nodes=[FlattenMapper(shape=(73, 87, 73),
auto_train=True, space='voxel_indices'),
StaticFeatureSelection(dshape=(463623,), slicearg=array([ 53391, 53462,
53463, ..., 415980, 415981, 416053]))])
##
An additional note, in case it matters: this dataset is the result of
vstacking two datasets (the same subject on two scanning days; the masks on
both days are the same.  The subject's brain is also, presumably, the
same.) using this command

agg_ds = vstack((ds1, ds2), a=0)

And as a reminder, here's how I write this thing to disk after processing
with it:

res = sl(dsinv)
nimg = map2nifti(dsinv, res.samples[0])
filename = "{}.agg.{}.r{}.c{}__{}".format(subj, contrast, radius_size,
clfName, maskName)
nimg.to_filename(filename)


Does that help any?  Am I doing anything obviously wrong?

Thanks for your help and suggestions.  PyMVPA is such a cool community.

S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20141024/e05edbb1/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list