Orange Forum • View topic - Discretization?


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


Postby shimrod » Thu Jan 25, 2007 19:24

Is it possible to discretize only the continuous class of a particular set, and leave the other attributes continuous?

Discretize seems to leave no option but to discretize everything equally, and Interactive Discretization returns the following error:

Unhandle exception of type
File: in line 60
Function name: __call__
Code: apply(self.method, k)
File: in line 735
Function name: __call__
Code: apply(f, (), kwds)
File in line 639
Function name: defaultMethodChanged
Code: self.computeDiscretizer(i, idx, True)
File: in line 808
Function name: computeDiscretizer
Code: self.discretizers[idx] = discretizer
Exception type:
Exception value: discretizers

Postby Janez » Sat Jan 27, 2007 14:52

Do you use the latest snapshot of Orange? The interactive discretization widget has been completely redesigned and should work now. And you can set the discretization for each attribute separately or even only discretize the class.

If it still fails, I'd ask you for a sample of data so I can reproduce the error.


Postby shimrod » Mon Jan 29, 2007 10:40

With the latest snapshot, I'm getting a different error:

File: in line 830
Function name: processSignals
Code: handler(value)
File: in line 537
Function name: cdata
Code: self.graph.setData(None, data)
File: in line 86
Function name: setData
Code: self.classColors = OWGraphTools.ColorPaletteHSV(len(data.domain.classVar.values))
Exception type:
Exception value: 'orange.FloatVariable' has no attribute 'values'

I'm using the housing data set from Orange's own examples, directly feeding it from the File widget into Interactive Discretization.

Postby Janez » Mon Jan 29, 2007 11:18

Gosh, this widget is getting really complicated. Please copy over the existing I hope it's OK now.

The widget doesn't really belong to "lastStable"; it's fresh stuff, so we welcome any comments and reports.

If you want to use it to discretize the class only, set the Default discretization to "Leave continuous" and uncheck "Output original class". You'll figure out the rest.


Return to Questions & Support