Orange Forum • View topic - svmLearner in orange

svmLearner in orange

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

svmLearner in orange

Postby tempovan » Sun Apr 08, 2012 9:25

Hi,,

I am a newbie to data mining stuff. My problems are these:

1.I have a feature vector in the form of list in python which i need to supply as input to svm classifier. But svm classifier in orange requires me to send a .tab file.How to map my python list to .tab file ?
May be a simple question. But i m asking this question after a lot of googling and going thru the forums

Please help in this regard

2.Orange.feature.Discrete is not working.It reports no such module exists

Re: svmLearner in orange

Postby Ales » Tue Apr 10, 2012 16:19

tempovan wrote:1.I have a feature vector in the form of list in python which i need to supply as input to svm classifier. But svm classifier in orange requires me to send a .tab file.How to map my python list to .tab file ?

I assume you already trained the classifier.
Code: Select all
import Orange
iris = Orange.data.Table("iris")
svm_l = Orange.classification.svm.SVMLearner()
svm_c = svm_l(iris)
# classifiy a new instance (the last "?" is the unknown class)
my_feature_vector =  [5.6, 3.7, 1.3, 0.0, "?"]
new_instance = Orange.data.Instance(iris.domain, my_feature_vector)
print svm_c(new_instance)

Re: svmLearner in orange

Postby Ales » Tue Apr 10, 2012 16:23

tempovan wrote:2.Orange.feature.Discrete is not working.It reports no such module exists

It should work. You might have an older version of orange. When (and how) did you install it?

Re: svmLearner in orange

Postby emwal » Mon May 14, 2012 18:15

Found same issue with missing classes.

Here is what I get in the iPython shell when trying to tab-complete off of Orange.feature

Code: Select all
In [67]: Orange.feature.
Orange.feature.continuization  Orange.feature.imputation      Orange.feature.selection
Orange.feature.discretization  Orange.feature.scoring         


.. no Discrete class

I installed this on Ubuntu 12.04 following the Linux instructions on the download page.

Thanks!

Re: svmLearner in orange

Postby Ales » Wed May 16, 2012 10:10

emwal wrote:I installed this on Ubuntu 12.04 following the Linux instructions on the download page.
It seems the debian packages are still being build from our old and obsolete svn repository. Can you please follow the instructions for building from source, until the deb packages are updated.


Return to Questions & Support



cron