[pymvpa] Bad confusion matrix using RBF kernel SVM CrossValidation

gal star gal.star3051 at gmail.com
Sun Apr 5 08:44:45 UTC 2015


Hi,
Could anyone help with this problem?
I've tried performing grid search, though it doesn't seem to help.

Gal Star

On Tue, Mar 31, 2015 at 2:31 PM, gal star <gal.star3051 at gmail.com> wrote:

> 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]]
> Or:
> [[ 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 else?
>
> 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(),
>
>  Balancer(attr='targets',count=4,limit='partitions',
>                                          apply_selection=True)],
> space='partitions'),
>                                           enable_ca=['stats'])
> >> err = cv(fds)
> >> print cv.ca.stats.matrix
>
> Could use your help!
> Thanks,
> Gal Star
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20150405/5515aafe/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list