[pymvpa] On multiclass SVM predictions.

Roberto Guidotti robbenson18 at gmail.com
Wed Feb 6 16:16:39 UTC 2013


Hi all,

excuse me if I am persistent with question but it's a period!

I have a 3 class problem, I've used Linear SVM and I have to predict
unlabeled example.

last three predictions are: [zip(clf.ca.predictions, clf.ca.estimates)]

 ('2',  {(0, 1): -0.09890229020627583,
   (0, 2): -0.2536111424226052,
   (1, 0): 0.09890229020627583,
   (1, 2): -0.32887084879068407,
   (2, 0): 0.2536111424226052,
   (2, 1): 0.32887084879068407}),
 ('1',  {(0, 1): -0.1287248424929092,
   (0, 2): 0.1137648812987012,
   (1, 0): 0.1287248424929092,
   (1, 2): -0.34514225487917055,
   (2, 0): -0.1137648812987012,
   (2, 1): 0.34514225487917055}),
 ('0',   {(0, 1): 0.4770327123082485,
   (0, 2): 0.10609927336954401,
   (1, 0): -0.4770327123082485,
   (1, 2): -0.9581483307977487,
   (2, 0): -0.10609927336954401,
   (2, 1): 0.9581483307977487})]

The attribute ca.predictions is related to those values and no other
predictions are made.

The case that seems strange to me is the second since the predictions
is 1 and all classes win one time and the largest decision value is
the one of class 2.

Looking at probabilities I have this situation:

('2',  array([2.0, {0: 0.17660379481675886, 1: 0.2371580052969476, 2:
0.5862381998862938}], dtype=object)),
('1',  array([2.0, {0: 0.3151260809667211, 1: 0.27258209239064574, 2:
0.4122918266426331}], dtype=object)),
('0', array([0.0,  {0: 0.5088905790080193, 1: 0.0724097591638399, 2:
0.4186996618281407}], dtype=object))]

It looks strange to me but surely it is explainable for you!

Thank you
Roberto.



More information about the Pkg-ExpPsy-PyMVPA mailing list