Orange Forum • View topic - Error using SVMLearnerEasy

Error using SVMLearnerEasy

Report bugs (or imagined bugs).
(Archived/read-only, please use our ticketing system for reporting bugs and their discussion.)
Forum rules
Archived/read-only, please use our ticketing system for reporting bugs and their discussion.

Error using SVMLearnerEasy

Postby shreyas » Thu Mar 19, 2009 8:17

Hi,
I get a error while using Orange
here is my code
Code: Select all
import orange, orngTest, orngStat,orngSVM,orngFSS,orngEnsemble
data=orange.ExampleTable("C:/Python25/Lib/site-packages/orange/doc/datasets/yeast-class-RPR.tab")
l3=orngSVM.SVMLearnerEasy()
test=orngTest.crossValidation([l3],data,folds=3)
ca=orngStat.CA(test)
print ca


This does not run properly gives the following error

Code: Select all
Traceback (most recent call last):
  File "F:\Orange\svm_orange.py", line 17, in <module>
    test=orngTest.crossValidation([l3],data,folds=3)
  File "C:\Python25\lib\site-packages\orange\orngTest.py", line 185, in crossValidation
    return testWithIndices(learners, (examples, weight), indices, indicesrandseed, pps, **argkw)
  File "C:\Python25\lib\site-packages\orange\orngTest.py", line 389, in testWithIndices
    classifiers[i] = learners[i](learnset, weight)
  File "C:\Python25\lib\site-packages\orange\orngSVM.py", line 73, in __call__
    return self.learnClassifier(examples)
  File "C:\Python25\lib\site-packages\orange\orngSVM.py", line 179, in learnClassifier
    best=parameter_selection(self.learner, newexamples, self.folds, params)
  File "C:\Python25\lib\site-packages\orange\orngSVM.py", line 154, in parameter_selection
    search(learner, data, folds, keys, ranges, current, best, callback)
  File "C:\Python25\lib\site-packages\orange\orngSVM.py", line 145, in search
    search(learner, data, folds, keys[1:], ranges[1:], current, best, callback)
  File "C:\Python25\lib\site-packages\orange\orngSVM.py", line 129, in search
    te=orngTest.crossValidation([learner], data, folds)
  File "C:\Python25\lib\site-packages\orange\orngTest.py", line 185, in crossValidation
    return testWithIndices(learners, (examples, weight), indices, indicesrandseed, pps, **argkw)
  File "C:\Python25\lib\site-packages\orange\orngTest.py", line 389, in testWithIndices
    classifiers[i] = learners[i](learnset, weight)
orange.KernelException: 'orange.SVMLearner': LibSVM parameter error: specified nu is infeasible


Can some one help me solve this error!

Thanks in advance :)

Postby Ales » Thu Mar 19, 2009 12:22

There seems to be a problem with parameter selection and nu svc. I wil look into it some more, but for a quick fix set the svm_type parameter to SVMLearner.C_SVC:
Code: Select all
l3=orngSVM.SVMLearnerEasy(svm_type=orngSVM.SVMLearner.C_SVC)


However if you are feeling adventures and install the daily snapshot of orange, your code should work.

Postby shreyas » Thu Mar 19, 2009 13:28

Thanks Ales for the help, the change you advised worked.


Return to Bugs



cron