<div dir="ltr"><p class="MsoNormal"><span lang="EN-US" style="font-family:Arial,sans-serif;background-image:initial;background-repeat:initial">Hi, I would like to train
with a dataset and test with a different one. But I haven’t been able to find
out a straight forward way to do it. I read the very same question from a
couple of years ago (<a href="http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2010q4/001265.html">http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2010q4/001265.html</a>
) On it, the answer was to use a piece of code shown there:</span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-family:Arial,sans-serif;background-image:initial;background-repeat:initial"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black">cv = CrossValidatedTransferError(</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black">        
TransferError(LinearCSVMC()),</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black">         CustomSplitter([(0, 1)]))
# 0 for training, 1 for testing</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black">  sl = Searchlight(cv, radius=5)</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black">  # assuming you have dstrain and
dstest</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black">  dstrain.chunks[:] = 0</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black">  dstest.chunks[:] = 1</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black">  </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black">  sl_map = sl(dstrain + dstest)</span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New';color:black"><br></span></p>

<p class="MsoNormal"><span lang="EN-US">I tried
this, but I get the error:</span></p>

<p class="MsoNormal"><span lang="EN-US">NameError:
name 'CrossValidatedTransferError' is not defined</span></p>

<p class="MsoNormal"><span lang="EN-US">I’m using a
virtual machine with NeuroDebian 8.0 and supposedly pymvpa is up to date, seems like I'm missing some libraries. How can I get them?</span></p>

<p class="MsoNormal"><span lang="EN-US">Thanks</span></p></div>