Hi Yaroslav,<div><br></div><div>Thanks for the tips! The first one worked quite well (with a few minor tweaks).</div><div><br></div><div>All the best,</div><div>Michael<br><br><div class="gmail_quote">On Thu, Oct 28, 2010 at 7:18 PM, Yaroslav Halchenko <span dir="ltr"><<a href="mailto:debian@onerussian.com">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;">Hi Michael,<br>
<br>
Although your use case seems to be quite "reasonable to be common", apparently<br>
we do not have an interface for efficient "1 liner" solution for it...<br>
thanks for bringing it up...<br>
<br>
As for how to implement with PyMVPA 0.4 series, which I guess you are<br>
using:<br>
<br>
1. the easiest, but least efficient memory (and cpu) -wise<br>
<br>
join both datasets into a single one with two distinct chunk ids<br>
and then use CustomSplitter with a conventional flow of things for<br>
searchlight, i.e. something like (not tested -- be warned ;) )<br>
<br>
cv = CrossValidatedTransferError(<br>
TransferError(LinearCSVMC()),<br>
CustomSplitter([(0, 1)])) # 0 for training, 1 for testing<br>
<br>
sl = Searchlight(cv, radius=5)<br>
<br>
# assuming you have dstrain and dstest<br>
dstrain.chunks[:] = 0<br>
dstest.chunks[:] = 1<br>
<br>
sl_map = sl(dstrain + dstest)<br>
<br>
2. Searchlight is just a simple loop (see mvpa/measures/searchlight.py),<br>
which you could simply embed in your code and there do<br>
.selectFeatures on both datasets and providing them to TransferError instance<br>
call.<br>
3.<br>
4. ... well -- lets see first what you think about 1 (and 2) ;-)<br>
<br>
Cheers,<br>
<div><div></div><div class="h5"><br>
On Thu, 28 Oct 2010, Michael W. Cole wrote:<br>
<br>
> Hello PyMVPAers,<br>
<br>
> I'm attempting to use the searchlight class to train with one dataset<br>
> and test the resulting classifiers on another dataset. Is there a<br>
> straightforward way to do this? The searchlight class seems to want a<br>
> splitter object, yet it doesn't appear that there is a splitter class<br>
> that can take two datasets and designate one as the<br>
> training dataset and the other as the testing dataset.<br>
<br>
> Thanks,<br>
<br>
> Michael<br>
<br>
</div></div>> _______________________________________________<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/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
<br>
<br>
--<br>
.-.<br>
=------------------------------ /v\ ----------------------------=<br>
Keep in touch // \\ (yoh@|www.)<a href="http://onerussian.com" target="_blank">onerussian.com</a><br>
Yaroslav Halchenko /( )\ ICQ#: 60653192<br>
Linux User ^^-^^ [175555]<br>
<br>
<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/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Michael W. Cole, Ph.D.<br>Post-doctoral researcher<br>Cognitive Control & Psychopathology Lab<br>Washington University in St. Louis<br><a href="http://www.mwcole.net">http://www.mwcole.net</a><br>
</div>