[pymvpa] Train and test on different datasets using searchlights
Raúl Hernández
raul at lafuentelab.org
Tue Sep 1 21:30:12 UTC 2015
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 (
http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2010q4/001265.html
) On it, the answer was to use a piece of code shown there:
cv = CrossValidatedTransferError(
TransferError(LinearCSVMC()),
CustomSplitter([(0, 1)])) # 0 for training, 1 for testing
sl = Searchlight(cv, radius=5)
# assuming you have dstrain and dstest
dstrain.chunks[:] = 0
dstest.chunks[:] = 1
sl_map = sl(dstrain + dstest)
I tried this, but I get the error:
NameError: name 'CrossValidatedTransferError' is not defined
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?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20150901/8f7975a5/attachment.html>
More information about the Pkg-ExpPsy-PyMVPA
mailing list