## Classifier SVM possible problem with probabilities

3 posts
• Page

**1**of**1**### Classifier SVM possible problem with probabilities

Hi,

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=[])

classifier=sv(data)

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,

Angela

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=[])

classifier=sv(data)

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,

Angela

### Re: Classifier SVM possible problem with probabilities

This is an inconsistent behavior of SVMClassifier. The Predictions widget calls

which can return a different class value in case of ties (chooses a random tied value, but always the same for equal examples). The

EDIT:

I have opened a ticket for this http://orange.biolab.si/trac/ticket/1197

- 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
`classifier(example)`

EDIT:

I have opened a ticket for this http://orange.biolab.si/trac/ticket/1197

### Re: Classifier SVM possible problem with probabilities

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,

Angela

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,

Angela

3 posts
• Page

**1**of**1**