<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><hr class="">  

<pre class="">Hi again,  </pre><pre class=""><br class=""></pre><pre class="">>>>On Wed, 20 Mar 2019, <a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" class="">lasse.gueldener at gmail.com</a> wrote:

>>><i class=""> Hi Folks,
</i>
>>><i class=""> I’am quite new to pymvpa and am currently trying to implement searchlight analysis on group level. I ran an fMRI study where subjects had to discriminate the orientation (vertical versus non-Vertical) of a masked stimulus and rate their subjective awareness of the orientation (1-4 scale). So the targets/classes to be decoded are the orientations. However, I want to know whether orientation information persists on unaware trials.  So far I‘ve been able to run the analysis with an NFoldPartitioner  on a dataset that contains unaware trials only, but i actually want to train the classifier on all trials (awareness 1-4) in run 1-9 and test it on the tenth run only on unaware trials (awareness 1) in a leave-one-out fashion. So (I think) the crucial part that troubles me right now is to adjust the partitioner. I‘ve been looking at the sifter and the factorial partitioner documentation, but am still not sure about the implementation in such a case.
</i>

        In [6]: FactorialPartitioner?
        Init signature: FactorialPartitioner(cls, *args, **kwargs)
        Docstring:     
        Partitioner for two-level factorial designs

        Given another partitioner on a dataset containing two attributes that are
        organized in a hierarchy, it generates balanced folds of the super-ordinate
        category that are also balanced according to the sub-ordinate category.

        Example
        --------
        We show images of faces to the subjects. Subjects are familiar to some
        identities, and unfamiliar to others. Thus, we have one super-ordinate
        attribute "familiarity", and one sub-ordinate attribute "identity". We want
        to cross-validate familiarity across identities, that is, we train on the
        same number of familiar and unfamiliar identities, and we test on the
        left-over identities.

        >>> partitioner = FactorialPartitioner(NFoldPartitioner(attr='identity'),
        ...                                    attr='familiarity')


>so I think you need
        
        >>> partitioner1 = FactorialPartitioner(NFoldPartitioner(attr='chunks'),
        ...                                    attr='awareness')

>which should then do both aware -> unaware  and  unaware -> aware.  </pre><pre class="">What if I  want  to train the classifier  on aware and test it on unaware trials only (aware -> unaware and not vice versa)?  </pre><pre class="">>You can
>indeed combine with Sifter to just choose one if really desired (adjusting
>again from cut/pasted docs, so YMMV ;) )

    >>> par = ChainNode([partitioner1,
    ...                  Sifter([('partitions', 2),  # testing partition
    ...                          ('awareness', ['unaware'])])
    ...                 ], space='partitions')

>for CVing into unaware condition, assuming that  you have sample
>attributes awareness with values 'unaware' and 'aware' (I would advise to not
>code them up into ints, but be explicit for readability etc)
<br class=""></pre><pre class="">I thought of combining two such ChainNodes including a Sifter, yet I am not sure whether that would work or do something rather strange. Also is there an easy way to check which targets are contained in the generated training and test partitions?</pre><pre class="">
><i class=""> I appreciate any comment or suggestion.
</i>
>Hope above helps

>-- 
>Yaroslav O. Halchenko
>Center for Open Neuroscience     <a href="http://centerforopenneuroscience.org" class="">http://centerforopenneuroscience.org<br class=""></a>>Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
>Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
>WWW:   <a href="http://www.linkedin.com/in/yarik" class="">http://www.linkedin.com/in/yarik</a>        

</pre><div class="">Thanks in advance for any comments or suggestions.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Lasse </div></body></html>