[pymvpa] Multiple datasets in one hdf5 file

Yaroslav Halchenko debian at onerussian.com
Thu Jan 31 18:41:45 UTC 2013


something is wrong here since ds_all seems to be  just a list of strings
here if I read errors correctly -- what is in your ds_all? ;)

print ds_all[0]

On Thu, 31 Jan 2013, Kimberly Zhou wrote:

>    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):
>    ...���� [1]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,
>    <[2]pkg-exppsy-pymvpa-request at lists.alioth.debian.org> wrote:

>      Send Pkg-ExpPsy-PyMVPA mailing list submissions to
>      � � � � [3]pkg-exppsy-pymvpa at lists.alioth.debian.org

>      To subscribe or unsubscribe via the World Wide Web, visit
>      � � � �
>      [4]http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

>      or, via email, send a message with subject or body 'help' to
>      � � � � [5]pkg-exppsy-pymvpa-request at lists.alioth.debian.org

>      You can reach the person managing the list at
>      � � � � [6]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 <[7]kyqzhou at gmail.com>
>      To: "[8]pkg-exppsy-pymvpa at lists.alioth.debian.org"
>      � � � � <[9]pkg-exppsy-pymvpa at lists.alioth.debian.org>
>      Subject: [pymvpa] Multiple datasets in one hdf5 file
>      Message-ID:
>      � � � �
>      <[10]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:
>      <[11]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 <[12]debian at onerussian.com>
>      To: [13]pkg-exppsy-pymvpa at lists.alioth.debian.org
>      Subject: Re: [pymvpa] Multiple datasets in one hdf5 file
>      Message-ID: <[14]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
>      > [15]Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org

>      [16]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        



More information about the Pkg-ExpPsy-PyMVPA mailing list