<div dir="ltr"><div>Hi Michael,<br></div>I am sorry, I misunderstood your problem. Your snipet seems good to me. What do you mean by it doesn't work? Does it work if you limit only on training set and subjects for example? <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 22, 2017 at 6:28 PM, Michael Bannert <span dir="ltr"><<a href="mailto:mbannert@tuebingen.mpg.de" target="_blank">mbannert@tuebingen.mpg.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Richard,<br>
<br>
Thanks for your email. Unfortunately, this is not exactly the answer<br>
that I'm looking for:<br>
<br>
In the section you refer to, the only limiting condition is that the<br>
test set labels should remain unpermuted. This solves only 50 % of my<br>
problem. It has already been explained very well in the worked examples<br>
- so no problem there.<br>
<br>
However, I also want to permute only within runs (and subjects) and do<br>
not see how this can be achieved with AttributePermutator (or any other<br>
method).<br>
<br>
Best,<br>
Michael<br>
<span class=""><br>
<br>
On 22/05/17 17:32, Richard Dinga wrote:<br>
> Hi,<br>
> Does this answer your question?<br>
> <a href="http://www.pymvpa.org/tutorial_significance.html#avoiding-the-trap-or-advanced-magic-101" rel="noreferrer" target="_blank">http://www.pymvpa.org/<wbr>tutorial_significance.html#<wbr>avoiding-the-trap-or-advanced-<wbr>magic-101</a><br>
><br>
><br>
> On Fri, May 19, 2017 at 8:18 PM, Michael Bannert<br>
</span><div><div class="h5">> <<a href="mailto:mbannert@tuebingen.mpg.de">mbannert@tuebingen.mpg.de</a> <mailto:<a href="mailto:mbannert@tuebingen.mpg.de">mbannert@tuebingen.<wbr>mpg.de</a>>> wrote:<br>
><br>
> Dear all,<br>
><br>
> I would like to use permutation testing for spatially aligned<br>
> across-subject decoding. I have one vector of beta estimates per run<br>
> (aka chunks) and per subject. Hence I figured it would be wise to<br>
> permute within subjects and runs.<br>
><br>
> I can achieve this (I think) if I use AttributePermutator in this way:<br>
><br>
> permutator = AttributePermutator(attr='<wbr>targets', limit=['subject',<br>
> 'chunks'], count=n_perm)<br>
><br>
> According to the debugging information provided when setting the 'APERM'<br>
> option, the permutations that are produced look reasonable.<br>
><br>
> However, I would also like to permute only the training data. How can I<br>
> accomplish this?<br>
><br>
> I tried something like this:<br>
><br>
> permutator = AttributePermutator(attr='<wbr>targets', limit={<br>
> 'partitions': 1, 'subject': range(n_subj), 'chunks':<br>
> ['run%02.f' % j for j in range(1, n_runs + 1)]},<br>
> count=1)<br>
><br>
> ... but it doesn't work.<br>
><br>
> I guess I am not very clear on what the documentation of<br>
> AttributePermutator has to say about the limit argument.<br>
><br>
> Could anyone help?<br>
><br>
> Thanks & best,<br>
> Michael<br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Pkg-ExpPsy-PyMVPA mailing list<br>
> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.<wbr>alioth.debian.org</a><br>
</div></div>> <mailto:<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@<wbr>lists.alioth.debian.org</a>><br>
> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-exppsy-pymvpa</a><br>
> <<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-exppsy-pymvpa</a>><br>
<div class="HOEnZb"><div class="h5">><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Pkg-ExpPsy-PyMVPA mailing list<br>
> <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.<wbr>alioth.debian.org</a><br>
> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-exppsy-pymvpa</a><br>
><br>
<br>
______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.<wbr>alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-exppsy-pymvpa</a><br>
</div></div></blockquote></div><br></div>