Orange Forum • View topic - Print continous values

Print continous values

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

Print continous values

Postby st12iker » Fri Jun 07, 2013 6:06

Newbie here!

So my problem is as follows:

I have a dataset with both discrete and continous variables....

All the examples in the tutorial showed how to print the values of a discrete (categorical) variable..

but how do you print those for continous variables: I tried :

>>> data ="")
>>> data.domain.features
<Orange.feature.Continuous 'sepal length', Orange.feature.Continuous 'sepal width', Orange.feature.Continuous 'petal length', Orange.feature.Continuous 'petal width'>
>>> for x in data.domain[1]:
... print x

What im trying to do is clean data by doing the following type of statement:

If 'Age' < 0 'Age >120
return false;
else return true;

Re: Print continous values

Postby Ales » Mon Jun 10, 2013 10:01

Continuous variables do not have values listed in their descriptors (since they can take any float value). If you want to select some instances, you can use the method
Code: Select all
mask = [not (instance["Age"] < 0 or instance["Age"] > 120) for instance in data]
filtered =

Return to Questions & Support