[pymvpa] Bad confusion matrix using RBF kernel SVM CrossValidation

gal star gal.star3051 at gmail.com
Tue Mar 31 11:31:48 UTC 2015

Hi all,
I'm performing binary classification.
I'm using SVM as classifier with RBF kernel using Balancer.
Training stats get 100% accuracy.

Though, the confusion matrix results for different C and gamma are either:
[[ 248  216
       0  36]]
[[ 90  136
    158  116]]

I don't get how could the second matrix happend and whether it's because of
the data's nature or something is wrong with the classifier.

Do you know what's going on (which result as the second matrix)?
Could it be that the resutls are backwards somehow?
and how can I further understand if it's the data which is bad or something

My code looks as follows:
>> attr = SampleAttributes(os.path.join(source,map_name))
>> fds=fmri_dataset (samples=os.path.join(source,img_name),
                              targets=attr.targets, chunks=attr.chunks)
>> zscore (fds,param_est=('targets',['baseline'])
>> sens = SensitivityBasedFeatureSelection(OneWayAnova(),
             FixedNElementsTailSelector(1000, tail='upper',mode='select'))

>> clf = FeatureSelectionClassifier(SVM(kernel=RbfSVMKernel(gamma=0.001),

 svm_impl='C_SVC',C=10000), sens)
>> cv = CrossValidation (clf, ChainNode([NFoldPartitioner(),

>> err = cv(fds)
>> print cv.ca.stats.matrix

Could use your help!
Gal Star
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20150331/53b7bfff/attachment.html>

More information about the Pkg-ExpPsy-PyMVPA mailing list