<div dir="ltr">Awesome, thanks so much. So far so good... Hopefully it turns out ok!  Just out of curiosity, how does it choose the number of attributes to balance?  For each fold, is it a random number of balanced target labels each fold?  Or is it a fixed number (e.g., the maximum number of labels such that the number of target labels remains equal)?<div>

<br></div><div>thanks for your help... </div><div>Taku</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 29, 2013 at 4:19 PM, Yaroslav Halchenko <span dir="ltr"><<a href="mailto:debian@onerussian.com" target="_blank">debian@onerussian.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">you would need to use Balancer() in tandem with your NFoldPartitioner<br>
<br>
e.g. use following partitioner<br>
<br>
    partitioner = ChainNode([NFoldPartitioner(cvtype=1),<br>
                             Balancer(attr='targets',<br>
                                      count=1, # for real data > 1<br>
                                      limit='partitions',<br>
                                      apply_selection=True<br>
                                      )],<br>
                            space='partitions')<br>
<br>
instead of plain NFoldPartitioner<br>
<div class="im"><br>
<br>
On Tue, 29 Oct 2013, Taku Ito wrote:<br>
<br>
>    Hi,<br>
>    I'm currently running through PyMVPA my first time, and ran into question<br>
>    I couldn't quite figure out straightforwardly through the manual.<br>
>    The data set that I have currently has only two target labels, but the<br>
>    number of labels for each of the targets are unequal. �I'm curious to try<br>
>    and find a way to train and test the classifier on N-Fold subsets, where<br>
>    each subsets have an equal number of labels for each target value. �<br>
>    I'm currently constructing my CrossValidation object as such:<br>
>    clf = LinearCSVMC()<br>
>    cvte = CrossValidation(clf, NFoldPartitioner(),<br>
>    � � � � � � � � � � � � � � � � errorfx=lambda p, t: np.mean(p == t),<br>
>    � � � � � � � � � � � � � � � � enable_ca=['stats'])<br>
>    I was thinking that maybe the 3rd parameter in the documentation, the<br>
>    'Splitter' instance may be useful, but I was confused since the<br>
>    documentation seems to indicate that it would split the attributes based<br>
>    on the labels... �I also came across NFoldSplitter during my search (which<br>
>    looked promising), but it seemed as if that object was no longer<br>
>    supported. �Please let me know if you might have any insights!<br>
>    Thanks,<br>
>    Taku<br>
--<br>
</div>Yaroslav O. Halchenko, Ph.D.<br>
<a href="http://neuro.debian.net" target="_blank">http://neuro.debian.net</a> <a href="http://www.pymvpa.org" target="_blank">http://www.pymvpa.org</a> <a href="http://www.fail2ban.org" target="_blank">http://www.fail2ban.org</a><br>

Senior Research Associate,     Psychological and Brain Sciences Dept.<br>
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755<br>
Phone: <a href="tel:%2B1%20%28603%29%20646-9834" value="+16036469834">+1 (603) 646-9834</a>                       Fax: <a href="tel:%2B1%20%28603%29%20646-1419" value="+16036461419">+1 (603) 646-1419</a><br>
WWW:   <a href="http://www.linkedin.com/in/yarik" target="_blank">http://www.linkedin.com/in/yarik</a><br>
<br>
_______________________________________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a></blockquote></div><br><br clear="all"><div>
<br></div>-- <br><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Takuya Ito</font></span><br><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Cognitive Control & Psychopathology Laboratory</font></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Washington University in St. Louis<br></font></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666"><br>
</font></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Cole Neuroscience Laboratory (</font></span><font color="#666666"><a href="http://www.mwcole.net/" target="_blank">http://www.mwcole.net/</a>)</font></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Center for Molecular and Behavioral Neuroscience (CMBN)</font></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><font color="#666666">Rutgers-Newark University</font></span></div>
</div>
</div>