Orange Forum • View topic - Error in orngSVM.py ?

Error in orngSVM.py ?

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 in orngSVM.py ?

Postby Guest » Thu Mar 25, 2010 17:14

Hello,

I was trying to use the Nu-SVR upon the boston housing data set.

import orange
import orngSVM
data = orange.ExampleTable('/home/jens/orange/doc/datasets/housing')
l1=orngSVM.SVMLearnerEasy()
l1.svm_type=orngSVM.SVMLearnerEasy.Nu_SVR
l1.kernel_type=orange.SVMLearner.Linear
l1(data)

gives the following error message result:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "orngSVM.py", line 87, in __call__
return self.learnClassifier(examples)
File "orngSVM.py", line 181, in learnClassifier
maxNu = max(self.maxNu(newexamples) - 1e-7, 0.0)
File "orngSVM.py", line 22, in maxNu
dist = list(orange.Distribution(examples.domain.classVar, examples))

which can be lifted by adding modifying line 22 in orngSVM.py to

dist = list(orange.Distribution(examples.domain.classVar, examples).items()).

Sadly this leads to another more severe error:
>>> import orange
>>> import orngSVM
>>> data = orange.ExampleTable('/home/jens/orange/doc/datasets/housing')
>>> l1=orngSVM.SVMLearnerEasy()
>>> l1.svm_type=orngSVM.SVMLearnerEasy.Nu_SVR
>>> l1.kernel_type=orange.SVMLearner.Linear
>>> l1(data)
Segmentation fault


Any help would be deeply appreciated.

Postby Ales » Fri Mar 26, 2010 11:11

This seems like a bug that was fixed about a month ago. If you have an old orange snapshot installation, can you update it and see if the bug persist?

Thanks

Postby Guest » Fri Mar 26, 2010 15:21

Thanks a lot. Reinstalling the nightly build helped. The error is gone.

Best regards,


Return to Bugs