Thanks Jo!<div><br></div><div>For me, I don't have that many runs, so partitioning on groups of runs is not really a good option. So I'd rather try doing "leave-n-samples out" instead of "leave-n-runs out" -- I looked at your paper and indeed it seems that breaking the run structure is ok for classification However, do you know of any way to do that with pre-written pymvpa functions, or do I have to manually partition the runs myself?</div>
<div><br></div><div>Thanks!</div><div>-Edmund<br><br><div class="gmail_quote">On Wed, Aug 8, 2012 at 3:37 PM, J.A. Etzel <span dir="ltr"><<a href="mailto:jetzel@artsci.wustl.edu" target="_blank">jetzel@artsci.wustl.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What you describe is one option. I talked about those types of schemes and when they can be ok (in my opinion!) in <a href="http://dx.doi.org/10.1016/j.neuroimage.2010.08.050" target="_blank">http://dx.doi.org/10.1016/j.<u></u>neuroimage.2010.08.050</a><br>

<br>
As general advice, it seems best to try to partition so that the number of examples of each case in each cross-validation fold is roughly equal. Sometimes that's just plain not possible. For example, I have a dataset with a large number of runs, but only trials the person gets correct are analyzed, so the number of examples in some runs for some people varies drastically. What we did in this case was to partition on groups of runs, so one fold is to leave runs 1,2,3, and 4 out. This scheme equalized the number of examples somewhat (though I still subsetted examples to make them exactly equal), and seemed to help the amount of variation.<br>

<br>
Jo<div><div class="h5"><br>
<br>
<br>
On 8/7/2012 10:52 AM, Edmund Chong wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi all,<br>
<br>
I recently asked a question on dealing with unbalanced datasets and<br>
here's a follow-up question.<br>
So let's say I have empty runs, or runs where there are zero samples for<br>
one of the conditions. This leads to problems if that run happens to be<br>
the test run on a leave-one-run-out cross-validation procedure.<br>
<br>
My workaround for that was this: if I had one of such runs with empty<br>
conditions, then I would set NFoldPartitioner(cvtype=2), together with<br>
Balancer() so that any combination of two runs would have at least one<br>
sample per condition. But if I had two of such runs with empty<br>
conditions, then I would set cvtype=3, and so on. However this means I<br>
have less data for the training set on each classification fold.<br>
<br>
Is there any other possible solution for this? In fact, is it possible<br>
to do leave-n-samples-out classification: So on each fold I randomly<br>
select n samples per condition to test on, and use the remaining samples<br>
(after balancing) for training, disregarding the chunks structure?<br>
<br>
Thanks!<br>
-Edmund<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.<u></u>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.<u></u>org/cgi-bin/mailman/listinfo/<u></u>pkg-exppsy-pymvpa</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Joset A. Etzel, Ph.D.<br>
Research Analyst<br>
Cognitive Control & Psychopathology Lab<br>
Washington University in St. Louis<br>
<a href="http://mvpa.blogspot.com/" target="_blank">http://mvpa.blogspot.com/</a><br>
<br>
______________________________<u></u>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org" target="_blank">Pkg-ExpPsy-PyMVPA@lists.<u></u>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.<u></u>org/cgi-bin/mailman/listinfo/<u></u>pkg-exppsy-pymvpa</a><br>
</font></span></blockquote></div><br></div>