[pymvpa] How could I know which features were selected by feature selection?

ibinliu at sina.com ibinliu at sina.com
Tue Apr 19 07:31:25 UTC 2016


Hi all,I performed feature selection using anova and wanted the features back to NIfTI. I used the following comment lines but encountered an error:
clf = LinearCSVMC()fsel = SensitivityBasedFeatureSelection(OneWayAnova(),                                        FixedNElementTailSelector(2000, 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)
final_dataset = fclf.mapper.forward(ds)
print final_dataset<Dataset: 128x2000 at float32, <sa: chunks,targets,time_coords,time_indices>, <fa: voxel_indices>, <a: imgaffine,imghdr,imgtype,mapper,voxel_dim,voxel_eldim>>
nimg = map2nifti(final_dataset)nimg.to_filename('features.nii')ValueError: array is not broadcastable to correct shape
Has anyone else had the same errors before?Any advice will be greatly appreciated. Thanks.Best,Bin Liu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20160419/4926ea75/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list