<div dir="ltr">Thank you for your answer.<div><br></div><div>I didn't mention that each subject is considered either class A or class B,</div><div>it's a binary classification. </div><div><br></div><div>I've tried to do what you suggested and consider each subject as test groups,</div><div>where the rest are train group.</div><div><br></div><div>Indeed it changed (not 100% anymore), though it's still looks fishy.</div><div>I've attached as you requested a short part of my script</div><div>and also the results (including confusion matrix).<br></div><div><br></div><div>Thanks,</div><div>Gal Star</div><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 12, 2015 at 12:38 PM, Nick Oosterhof <span dir="ltr"><<a href="mailto:n.n.oosterhof@googlemail.com" target="_blank">n.n.oosterhof@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 12 Jan 2015, at 09:23, gal star <<a href="mailto:gal.star3051@gmail.com">gal.star3051@gmail.com</a>> wrote:<br>
<br>
> I am wondering how to perform classification over<br>
> a cross subject nifti file i've created using FSL. […]<br>
><br>
> I've tried to use NFoldPartitioner with LinearCSVMC, though<br>
> the results are always 100% accuracy (which looks fishy).<br>
><br>
> I've assured there is no contamination in the data (no scan from trainset<br>
> exists also in testset).<br>
><br>
> What is the correct way to perform cross subject classification<br>
> over functional datasets?<br>
<br>
</span>At the very least you want to have different values for .sa.chunks for different subjects. In that way, you will not train and test on the same subject. This can simply be achieved by NFoldPartitioner.<br>
<br>
A bit more advanced is using a partitioning scheme where you test on data from one subject in one run, after training on the data from all other runs in all other subjects. This may reduce run-specific effects shared across subjects, if different subjects do exactly the same task during corresponding runs. For this you could use a Sifter [1]. Its use is a bit more complicated (hopefully less so in the future [2])<br>
<br>
If you need more help, it would be useful if you could post a minimally short snippet of your script that shows how you load the data, assign .sa.targets and .sa.chunks, define the partitioning scheme, and run the cross validation.<br>
<br>
[1] <a href="http://www.pymvpa.org/generated/mvpa2.generators.base.Sifter.html" target="_blank">http://www.pymvpa.org/generated/mvpa2.generators.base.Sifter.html</a><br>
[2] <a href="https://github.com/PyMVPA/PyMVPA/issues/261" target="_blank">https://github.com/PyMVPA/PyMVPA/issues/261</a><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><br>
</blockquote></div><br></div>