Orange Forum • View topic - Question about SVM

Question about SVM

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

Question about SVM

Postby keithwai » Wed Oct 07, 2009 18:36

Hello all,

I am new to Orange and data mining, I am just a student. I like python and recently I start to learn machine learning to prepare for a research topic. I have to learn SVM and I know there is a good library out there called libsvm. I read some document here and seems like Orange embedded this library. However, I also found two separate pages about the SVM usage:

It seems to me these two are different libraries/modules, so if I am to apply sth same as libsvm, which module should I use?

Another question, refer to the document on the libsvm site:
Can anyone give me a very simple example that mimic the example on the page 9 of the document using Orange (by scripting)?

Thanks alot.

Postby bgbg » Thu Oct 08, 2009 12:39

Code: Select all
import orange
import orngSVM

dataTraining = orange.ExampleTable('')
dataValidation = orange.ExampleTable('')

learner = orngSVM.SVMLearner() #add your options here

classifier = learner(dataTraining)

# testing
print 'observed\tpredicted'
for e in dataValidation:
    print e.getclass().value, '\t', classifier.(e, orange.GetValue).value

As to your first question, it seems that these are two interfaces to the same functionality. However, orngSVM contains the very useful SVMLearnerEasy, which is similar in functionality to from the document you have mentioned (without graphs).

Return to Questions & Support