Hello Mathieu, > I am currently using linear SVM to perform classification analyses with > fMRI data. I wanted to extract the weight for each feature in order to > map them back on the brain. Since I am doing a 4 class classification > (supposedly under the 'one vs. one' heuristic), there are 3 weights for > each feature. I do not come from a math speciality so I wouldn't know > how to obtain only 1 weight to map back.
well there is no real solution to this problem. That's why most people use only binary classification for such brain mapping. One way (not yet possible with the scikit) is to use a joint sparsity constraints for all 3 weights so the zeros are shared and you can inspect the voxels with non-zero weights for all tasks. that's for example what we used in the benchmark in : http://fr.arxiv.org/abs/1105.0363 > I am also using the RFE and since it just runs several linear SVM and > keeps only the best weights to continue, I found that the ordering of > the features by weights is done via this line of code: > > ranks = np.argsort(np.sum(estimator.coef_ ** 2, axis=0)) > > My question is: Why the summation of the squared weight matrix is used? > What is the logic behind it? not quite sure. Maybe ranks = np.argsort(np.sum(np.abs(estimator.coef_), axis=0)) would make sense too. Cheers, Alex ------------------------------------------------------------------------------ Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World™ now supports Android™ Apps for the BlackBerry® PlayBook™. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
