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

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

>>>data=orange.ExampleTable("adult_sample")
>>>m = orange.MeasureAttribute_info(handlesContinuous=True)
>>>score = m(data.domain["workclass"],data)
>>>score
.0048608
>>>score = m(data.domain["age"],data)
Traceback (most recent call last):
File "<pyshell#102>", line 1, in <module>
m(data.domain['age'],data)
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".

Thanks

Postby Janez » Mon Apr 13, 2009 9:48

Hi,

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



cron