[pymvpa] dataset issue

Yaroslav Halchenko debian at onerussian.com
Tue Apr 11 04:34:36 UTC 2017


On Tue, 11 Apr 2017, David Soto wrote:

> Thanks Yaroslav, however what concerns me the most is the initial output of data summary with the number of targets per chunk, those numbers seem non sense,  as there are 588 trials there are not 
> 14406 targets per chunk? thanks!

> >>> print alldata.summary()

> Dataset: 588x6 at float64, <sa: chunks,targets>
> stats: mean=nan std=nan var=nan min=nan max=nan

> Counts of targets in each chunk:
>   chunks\targets   1     2
>                   ---   ---
>         0        14406 14406
>         1        14406 14406
>         2        14406 14406
>         3        14406 14406
>         4        14406 14406
>         5        14406 14406
>         6        14406 14406
>         7        14406 14406
>         8        14406 14406
>         9        14406 14406
>        10        14406 14406
>        11        14406 14406

> Summary for targets across chunks
>   targets   mean   std    min      max   #chunks
>     1     1.44e+04  0  1.44e+04 1.44e+04    12
>     2     1.44e+04  0  1.44e+04 1.44e+04    12

> Summary for chunks across targets
>   chunks   mean   std    min      max   #targets
>     0    1.44e+04  0  1.44e+04 1.44e+04     2
>     1    1.44e+04  0  1.44e+04 1.44e+04     2
>     2    1.44e+04  0  1.44e+04 1.44e+04     2
>     3    1.44e+04  0  1.44e+04 1.44e+04     2
>     4    1.44e+04  0  1.44e+04 1.44e+04     2
>     5    1.44e+04  0  1.44e+04 1.44e+04     2
>     6    1.44e+04  0  1.44e+04 1.44e+04     2
>     7    1.44e+04  0  1.44e+04 1.44e+04     2
>     8    1.44e+04  0  1.44e+04 1.44e+04     2
>     9    1.44e+04  0  1.44e+04 1.44e+04     2
>    10    1.44e+04  0  1.44e+04 1.44e+04     2
>    11    1.44e+04  0  1.44e+04 1.44e+04     2
> Sequence statistics for 588 entries from set [1, 2]
> Counter-balance table for orders up to 2:
> Targets/Order  O1      |   O2      |
>       1:      163 130  |  142 151  |
>       2:      130 164  |  150 143  |
> Correlations: min=-0.13 max=0.12 mean=-0.0017 sum(abs)=21

wow -- that is a nice one!  we should fix up for this... reason is :

In [15]: alldata.chunks.shape
Out[15]: (588, 1)

i.e. your chunks are two dimensional and I guess some broadcasting kicks in
somewhere during our counts thus "beefing up" number of samples per each chunk
;)

just do

alldata.sa.chunks = alldata.sa.chunks[:, 0]

and all will be good ;)

-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
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