[pymvpa] Sensitivity analysis fails
Sergi Costafreda
Sergi.Costafreda at iop.kcl.ac.uk
Mon Feb 9 10:33:25 UTC 2009
Thanks for fixing this so quickly!
I installed pymvpa-0.4.1 from its tarball on a Mac Os X 10.5.6.
To refresh from your version in git would it be:
$ git clone git://git.debian.org/git/pkg-exppsy/pymvpa.git
?
Also, thanks for your comments on the interpretation of remapping sens into
original feature space:
> so, sens itself is mapped back into original feature space, but I am not
> sure what that would actually mean here (interpretations could vary)
> since it effectively replaces (IIRC) singular values with
> sensitivites, ie changes contribution of each of SVD components.
Could we not interpret it as which elements of the original feature space
are more influential on the classification?
On 05/02/2009 18:08, "Yaroslav Halchenko" <debian at onerussian.com> wrote:
> o o -- you've hit a bug ;) sorry about that
>
> I pushed a fix in my (yoh/master) branch in our git repository,
> but what do you run it on (OS?) and from (package, git repository,
> source tarball)? would you be able to use pymvpa directly from the
> sources in git repository?
>
> More about fix:
>
> since this moment we have 2 separate kinds of analyzers (for
> regular mapped or featureselection classifiers), but that is irrelevant
> at this user level. But also I've added a state variable
> clf_sensitivities for sensitivity analyzers of proxy-classifiers, so
> now, in your case I have:
>
> clf=MappedClassifier(LinearCSVMC(), SVDMapper())
> sensana=clf.getSensitivityAnalyzer()
> sensana.states.enable(['clf_sensitivities'])
> sens=sensana(dataset)
> print sens.shape
> print sensana.clf_sensitivities.shape
>
> and if it is ran as a part of our svdclf example on sample dataset I
> see:
>
> Dataset / float32 216 x 530 uniq: 12 chunks 2 labels
> (530,)
> (216, 1)
>
>
> so, sens itself is mapped back into original feature space, but I am not
> sure what that would actually mean here (interpretations could vary)
> since it effectively replaces (IIRC) singular values with
> sensitivites, ie changes contribution of each of SVD components.
>
> but sensana.clf_sensitivities is smth easy to make sense of -- that
> would be the sensitivities of the 'slave' classifier (ie
> LinearCSVMC) which was ran on remapped data... from it you could assess
> what dimensions of eigenspace are more influential on classification
> than the others
>
> On Thu, 05 Feb 2009, Sergi Costafreda wrote:
>
>> Hi all
>> Just starting with PyMVPA - thanks for a great tool!
>> I am trying to obtain a sensitivity analysis for a SVD+SVM mapped
>> classifier, by adapting the code of sensanas.py. When I try to run
>> (1) >>> clf=MappedClassifier(LinearCSVMC(), SVDMapper())
>> (2) >>> sensana=clf.getSensitivityAnalyzer()
>> (3) >>> sens=sensana(data)
>> Line (2) returns the following error:
>>>>> "AttributeError: 'MappedClassifier' object has no attribute
>> '_MappedClassifier__clf'"
>> I'd be grateful for any help with this!
>> Best,
>> Sergi
>
>> _______________________________________________
>> Pkg-ExpPsy-PyMVPA mailing list
>> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
>> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
>
More information about the Pkg-ExpPsy-PyMVPA
mailing list