Orange Forum • View topic - Classifier SVM possible problem with probabilities

Classifier SVM possible problem with probabilities

A place to ask questions about methods in Orange and how they are used and other general support.

Classifier SVM possible problem with probabilities

Postby apimentel » Wed Jun 13, 2012 17:51


I'm using orange to built my classifier. I'm using 5 attributes and have 2 classes (0 and 1). In the orange software I used the predictions widget to see what the classifier was doing. My goal is to construct this classifier using the functions that the orange provide in python. I noticed that the accuracy is the same as well as the probabilities , however the predictions result aren't. Here it is is my classififer:

sv = Orange.classification.svm.SVMLearner(svm_type=orange.SVMLearner.C_SVC, kernel_type=orange.SVMLearner.Sigmoid,kernel_func=None, C=2, nu=0.5, p=0.1, gamma=8.0, coef0=0, shrinking=True, probability=True, verbose=False, cache_size=200, eps=0.0010, normalization=True, weight=[])


Because I have many predictions whose probabilites are 0.5000 I noticed that in Orange sometimes it predicts 1 and other times 0. However using this function it always predicts 1. Is there any other parameter that I should include so that the predictions here are the same as the Orange?

thank you for the help,


Re: Classifier SVM possible problem with probabilities

Postby Ales » Thu Jun 14, 2012 12:23

This is an inconsistent behavior of SVMClassifier. The Predictions widget calls
Code: Select all
classifier(example, classifier.GetBoth)

which can return a different class value in case of ties (chooses a random tied value, but always the same for equal examples). The
Code: Select all
however simply returns the value as predicted by LibSVM (does not handle ties).

I have opened a ticket for this

Re: Classifier SVM possible problem with probabilities

Postby apimentel » Thu Jun 14, 2012 15:50

Thank you for the help, couldn't do this by myself.

If possible I also wanted to ask, in response of the classifier I achieved an accuracy of 100% using the leave one out validation. However most of the predictions show a probability of 0.5 in the orange software. If the classifier is accurate how come most of probabilities are 0.5? Is this a problem of the SVM function?

Thank you,


Return to Questions & Support