[pymvpa] Feature selection on RSA

Roberto Guidotti robbenson18 at gmail.com
Sat Dec 17 11:53:24 UTC 2016


Well,
in classical MVPA you must perform feature selection within the
cross-validation, that's why it seems that the feature selection is not
performed in the snippet.
To use feature selection outside the cross-validation you should do

ds_fs = fsel(ds) # This line lets you to perform feature selection
res = dsm(ds_fs)

Bests,
R


On 24 August 2016 at 16:20, Alyson Saenz <neuro.alyson at gmail.com> wrote:

> Hey guys, I'm having problems wrapping my head around this.
>
>
>
> I'm trying to run a representational similarity analysis RSA, on the same
> data in which I run a MVPA analysis to compare both outputs. My problem is
> that when I introduce the data for MVPA, I use feature selection like in
> the tutorial, so I grab 5% of the ANOVA’s output and use it to train and
> test the data. But in the tutorial, seems like you grab all the voxels, not
> only a selection.
>
>
>
> How can I grab only the same 5% for RSA?
>
>
>
> This is the code I use for MVPA:
>
>
>
> clf = LinearCSVMC()
>
> fsel = SensitivityBasedFeatureSelection(OneWayAnova(),
> FractionTailSelector(0.05, mode='select', tail='upper'))
>
> fclf = FeatureSelectionClassifier(clf, fsel)
>
> cvte = CrossValidation(fclf, NFoldPartitioner(), errorfx=lambda p, t:
> np.mean(p == t), enable_ca=['stats'])
>
> cv_results = cvte(ds)
>
>
>
> This is the one I got for RSA:
>
>
>
> dsm = rsa.PDist(square=True)
>
> res = dsm(ds)
>
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20161217/de7cdd34/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list