[pymvpa] Multiple datasets in one hdf5 file

Kimberly Zhou kyqzhou at gmail.com
Thu Jan 31 18:31:25 UTC 2013


Hi,
Thank you so much for the replies!! I now have 18 subject's datasets in one
file, but seem to still be missing something. Working through the
hyperalignment tutorial, after loading using h5load, zscoring the
individual datasets or inserting subject IDs to the individual datasets
doesn't work with my combined dataset file (missing some attributes). It
definitely works when using the example hyperalignment dataset file though.
Pardon me for the repeated questions on this. Would anyone please let me
know if there is something I am neglecting to do before saving all the
datasets into the one file? Thank you very much!

Kimberly

>>> _ = [zscore(ds) for ds in ds_all]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/mvpa2/mappers/zscore.py", line 286, in
zscore
    zm.train(Dataset(ds))
  File "/usr/lib/pymodules/python2.7/mvpa2/base/dataset.py", line 214, in
__init__
    "AttrDataset only supports dtypes as samples that have a "
ValueError: AttrDataset only supports dtypes as samples that have a `dtype`
attribute that behaves similar to the one of an array-like.

>>> for i,sd in enumerate(ds_all):
...     sd.sa['subject'] = np.repeat(i, len(sd))
...
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
AttributeError: 'str' object has no attribute 'sa'

On Fri, Jan 11, 2013 at 6:00 AM, <
pkg-exppsy-pymvpa-request at lists.alioth.debian.org> wrote:

> Send Pkg-ExpPsy-PyMVPA mailing list submissions to
>         pkg-exppsy-pymvpa at lists.alioth.debian.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
>
> or, via email, send a message with subject or body 'help' to
>         pkg-exppsy-pymvpa-request at lists.alioth.debian.org
>
> You can reach the person managing the list at
>         pkg-exppsy-pymvpa-owner at lists.alioth.debian.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Pkg-ExpPsy-PyMVPA digest..."
>
>
> Today's Topics:
>
>    1. Multiple datasets in one hdf5 file (Kimberly Zhou)
>    2. Re: Multiple datasets in one hdf5 file (Yaroslav Halchenko)
>    3. Re: Multiple datasets in one hdf5 file (Michael Hanke)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 10 Jan 2013 12:57:07 -0600
> From: Kimberly Zhou <kyqzhou at gmail.com>
> To: "pkg-exppsy-pymvpa at lists.alioth.debian.org"
>         <pkg-exppsy-pymvpa at lists.alioth.debian.org>
> Subject: [pymvpa] Multiple datasets in one hdf5 file
> Message-ID:
>         <
> CA+ydVYKCpdMRvtWhQfbpwtzOnZ8F_Pntfo5k+QBr+3Lr8L5LyA at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello,
> On the hyperalignment tutorial, the data (with attributes and everything
> already) for multiple subjects are all in one hdf5 file. Is there a page or
> something that shows how to save multiple datasets into one hdf5 file?
> Apologies
> for more noob questions. Thank you!!
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20130110/6894ca65/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Thu, 10 Jan 2013 14:01:03 -0500
> From: Yaroslav Halchenko <debian at onerussian.com>
> To: pkg-exppsy-pymvpa at lists.alioth.debian.org
> Subject: Re: [pymvpa] Multiple datasets in one hdf5 file
> Message-ID: <20130110190103.GG19929 at onerussian.com>
> Content-Type: text/plain; charset=utf-8
>
> should be as simple as storing one since you can store (theoretically)
> any structure, so just try
>
> h5save('/tmp/out.h5', [ds1, ds2])
>
> and then load as
>
> ds1, ds2 = h5load('/tmp/out.h5')
>
> On Thu, 10 Jan 2013, Kimberly Zhou wrote:
>
> >    Hello,?
> >    On the hyperalignment tutorial, the data (with attributes and
> everything
> >    already)?for multiple subjects are all in one hdf5 file. Is there a
> page
> >    or something that shows how to save multiple datasets into one hdf5
> file?
> >    Apologies for more noob questions.?Thank you!!
>
> > _______________________________________________
> > Pkg-ExpPsy-PyMVPA mailing list
> > Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> >
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
>
>
> --
> Yaroslav O. Halchenko
> Postdoctoral Fellow,   Department of Psychological and Brain Sciences
> Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
> Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
> WWW:   http://www.linkedin.com/in/yarik
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 10 Jan 2013 20:26:47 +0100
> From: Michael Hanke <michael.hanke at gmail.com>
> To: Development and support of PyMVPA
>         <pkg-exppsy-pymvpa at lists.alioth.debian.org>
> Subject: Re: [pymvpa] Multiple datasets in one hdf5 file
> Message-ID:
>         <CAK-KoxRg0mQZjXQjXzB=
> F66WQ5MVMawxf6jUyMgFQDx262vdiQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> On Thu, Jan 10, 2013 at 8:01 PM, Yaroslav Halchenko
> <debian at onerussian.com>wrote:
>
> > should be as simple as storing one since you can store (theoretically)
> > any structure, so just try
> >
> > h5save('/tmp/out.h5', [ds1, ds2])
> >
> > and then load as
> >
> > ds1, ds2 = h5load('/tmp/out.h5')
>
>
> Or use a dict and access them by name:
>
> h5save('test.df5', dict(one=5, two=6))
>
> d = h5load('test.df5')
> d['one']
> 5
>
>
> --
> GPG key:  1024D/3144BE0F Michael Hanke
> http://mih.voxindeserto.de
> Jabber: michael.hanke at gmail.com
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20130110/bffbd5bb/attachment-0001.html
> >
>
> ------------------------------
>
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
>
> End of Pkg-ExpPsy-PyMVPA Digest, Vol 59, Issue 6
> ************************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20130131/209e44e3/attachment-0001.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list