I am using libsvm for multi-class classification. How can I attach classification scores, to compare the confidence of classification, with the output for a given sample as:

Class 1: score1

Class 2: score2

Class 3: score3

Class 4: score4

asked Jun 18 '11 at 07:17

Xolve's gravatar image

Xolve
16224

I do not want a single class id as the classification output. Rather the output should be like: the given sample can be classified to class1 with probability score1.

(Jun 18 '11 at 14:31) Xolve

2 Answers:

SVM's are not a probabilistic tool, they are quite certain on their classification. There are certain instances when you use your results from a kernel machine to gets probs. Check the option -p and the use of support vector classification on SVM's, but actually for your output you should use something more intuitive, like Mixture of Gaussians, which are designed to give probabilities of the classes.

answered Jun 18 '11 at 22:00

Leon%20Palafox's gravatar image

Leon Palafox
31265471107

Which classifiers other than Mixture of Gaussians would give me the output as I want?

(Jun 19 '11 at 00:12) Xolve
1

Mhhh, as far as I understand, what you want is: p(class=class_k/new_sample)

which is excactly the kind of problem that mixture models solve and the exact output you wish. Youy basically are describing a clustering with probabilities.

You might try a multiclass logistic regression, which should give you something similar.

Remember, SVM's are pretty good, but there are problems other tools can solve better.

(Jun 19 '11 at 07:33) Leon Palafox

See these two references for a method that has worked pretty well for me in practice: Platt and Lin et al. I believe this method is implemented in libsvm. You could also just use logistic regression in LibLinear.

answered Jun 19 '11 at 00:48

Lucas%20Wiman's gravatar image

Lucas Wiman
13615

Your answer
toggle preview

powered by OSQA

User submitted content is under Creative Commons: Attribution - Share Alike; Other things copyright (C) 2010, MetaOptimize LLC.