[pymvpa] AttributePermutator: Permute within chunks (& subjects) but only training labels

Michael Bannert mbannert at tuebingen.mpg.de
Mon May 22 16:28:21 UTC 2017


Hi Richard,

Thanks for your email. Unfortunately, this is not exactly the answer
that I'm looking for:

In the section you refer to, the only limiting condition is that the
test set labels should remain unpermuted. This solves only 50 % of my
problem. It has already been explained very well in the worked examples
- so no problem there.

However, I also want to permute only within runs (and subjects) and do
not see how this can be achieved with AttributePermutator (or any other
method).

Best,
Michael


On 22/05/17 17:32, Richard Dinga wrote:
> Hi,
> Does this answer your question?
> http://www.pymvpa.org/tutorial_significance.html#avoiding-the-trap-or-advanced-magic-101
> 
> 
> On Fri, May 19, 2017 at 8:18 PM, Michael Bannert
> <mbannert at tuebingen.mpg.de <mailto:mbannert at tuebingen.mpg.de>> wrote:
> 
>     Dear all,
> 
>     I would like to use permutation testing for spatially aligned
>     across-subject decoding. I have one vector of beta estimates per run
>     (aka chunks) and per subject. Hence I figured it would be wise to
>     permute within subjects and runs.
> 
>     I can achieve this (I think) if I use AttributePermutator in this way:
> 
>     permutator = AttributePermutator(attr='targets', limit=['subject',
>     'chunks'], count=n_perm)
> 
>     According to the debugging information provided when setting the 'APERM'
>     option, the permutations that are produced look reasonable.
> 
>     However, I would also like to permute only the training data. How can I
>     accomplish this?
> 
>     I tried something like this:
> 
>     permutator = AttributePermutator(attr='targets', limit={
>              'partitions': 1, 'subject': range(n_subj), 'chunks':
>     ['run%02.f' % j for j in range(1, n_runs + 1)]},
>               count=1)
> 
>     ... but it doesn't work.
> 
>     I guess I am not very clear on what the documentation of
>     AttributePermutator has to say about the limit argument.
> 
>     Could anyone help?
> 
>     Thanks & best,
>     Michael
> 
> 
> 
>     _______________________________________________
>     Pkg-ExpPsy-PyMVPA mailing list
>     Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
>     <mailto:Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org>
>     http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
>     <http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa>
> 
> 
> 
> 
> _______________________________________________
> 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
> 



More information about the Pkg-ExpPsy-PyMVPA mailing list