Orange Forum • View topic - measureAttribute_info() issue with handlesContinuous

measureAttribute_info() issue with handlesContinuous

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.

measureAttribute_info() issue with handlesContinuous

Postby aonlazio » Sat Apr 11, 2009 21:34

I found the issue concerning about measureAttribute_info()
Here is the example

>>>m = orange.MeasureAttribute_info(handlesContinuous=True)
>>>score = m(data.domain["workclass"],data)
>>>score = m(data.domain["age"],data)
Traceback (most recent call last):
File "<pyshell#102>", line 1, in <module>
KernelException: getEntropy: cannot evaluate the non-discrete attribute 'age'

I already set handlesContinuous=True but still, it can not measure information gain on the continuous attribute "age".


Postby Janez » Mon Apr 13, 2009 9:48


handlesContinuous should be treated as a read-only flag which tells you whether the class can deal with continuous attributes or not. (It actually used to be read only, but this caused complications with pickling and others.)

If you want to measure the information gain of a continuous attribute you will have to discretize it first.

Return to Bugs