On Dec 29, 2013, at 4:46 PM, Arman Eshaghi wrote:

> I'm confused on how to pass selected features from SVM sensitivity analysis 
> into another SVM for cross validation and performance measurement. [...] Here 
> is my script
> 
> # from mvpa2.tutorial_suite import *
> # clf=LinearCSVMC()
> # attr = SampleAttributes(os.path.join('/my/path/', 'attributes.txt'))
> # ds= fmri_dataset(samples='/path/to/samples.nii.gz', targets=attr.targets, 
> chunks=attr.chunks )
> # fsel = SensitivityBasedFeatureSelection(clf, 
> FixedNElementTailSelector(1000, mode='select', tail='upper'))

The first argument of the feature selection has to be a sensitivity analyzer 
(of class FeaturewiseMeasure); it cannot be 'just' a classifier

You could try:

sensana=clf.get_sensitivity_analyzer()

and provide sensana as the first argument to SensitivityBasedFeatureSelection.
_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

Reply via email to