Orange Forum • View topic - Weighting individual features

Weighting individual features

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

Weighting individual features

Postby Guest » Thu Feb 12, 2009 22:12

I was wondering whether it is possible to weight individual features, instead of just whole examples.

Say we have a feature-vector of continuous variables like: [ 0.73, 0.90, 0.25 ]

I would like to give the first feature (i.e. 0.73) a higher relevance than the other two. The idea is that the first feature is more important for the classification.

Postby Blaz » Sun Mar 01, 2009 18:09

Orange does not include an algorithm where explicit feature-weighting may be useful. However, if you are inclined to develop such an algorithm, you may store the weights in objects that store the features, something like:

Code: Select all
>>> data = orange.ExampleTable("iris")
>>> data.domain["sepal length"].w = 0.73
>>> print data.domain["sepal length"].w

Return to Questions & Support