Orange Forum • View topic - SVM Error

SVM Error

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.

SVM Error

Postby josh » Sat Aug 30, 2008 2:53

Hello,

I got an strange error message while I following the example in SVM help page;
http://www.ailab.si/orange/doc/modules/orngSVM.htm

import orange, orngSVM
data=orange.ExampleTable("iris.tab")
l1=orngSVM.SVMLearner() l1.kernelFunc=orngSVM.RBFKernelWrapper(orange.ExamplesDistanceConstructor_Euclidean(data), gamma=0.5)
l1.kernel_type=orange.SVMLearner.Custom

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'orange.SVMLearner' has no attribute 'Custom'

When I checked the content of SVMLearner, I got "CUSTOM" instead of "Custom".
>>> dir(orange.SVMLearner)
['CUSTOM', 'C_SVC', 'EPSILON_SVR', 'LINEAR', 'NU_SVC', 'NU_SVR', 'ONE_CLASS', 'POLY', 'RBF', 'SIGMOID', '__call__', '__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__nonzero__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'clone', 'dump', 'reference', 'setattr', 'typeid', 'write']

I also got similar error message when I tried to use SVM in Orange Canvas.

Unhandled exception of type AttributeError occured at 20:19:38:
Traceback:
File: OWBaseWidget.py, line 539 in processSignals
Code: handler(value)
File: OWSVM.py, line 104 in setData
Code: self.applySettings()
File: OWSVM.py, line 139 in applySettings
Code: self.classifier=self.learner(self.data)
File: orngSVM.py, line 58 in __call__
Code: if self.svm_type == orange.SVMLearner.Nu_SVC: #check nu feasibility
AttributeError: type object 'orange.SVMLearner' has no attribute 'Nu_SVC'

Thanks in advance.

Josh.

I forgot one thing

Postby josh » Sat Aug 30, 2008 2:55

My system is ubuntu linux hardy.
I installed exactly as the installation page says.

Thanks.

Josh

Postby Janez » Sat Aug 30, 2008 15:20

This looks as if you had old C++ sources (that is, what is now the ver1.0 branch on the svn) and new Python part (trunk).

(We accidentally ported the trunk widget back to ver1.0 branch, but we fixed that last week.)

What C++ sources do you have? Have you checked them out from the SVN? Which branch?

If you have the trunk, could you try "make clean", check that you have no .ppp or .px in any of the subdirectories, and then build again?

Janez


Return to Bugs