Orange Forum • View topic - Discretization?

Discretization?

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

Discretization?

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
Traceback:
File: orngSignalManager.py in line 60
Function name: __call__
Code: apply(self.method, k)
File: OWGUI.py in line 735
Function name: __call__
Code: apply(f, (), kwds)
File OWInteractiveDiscretization.py in line 639
Function name: defaultMethodChanged
Code: self.computeDiscretizer(i, idx, True)
File: OWInteractiveDiscretization.py 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.

Janez

Postby shimrod » Mon Jan 29, 2007 10:40

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

Traceback:
File: OWBaseWidget.py in line 830
Function name: processSignals
Code: handler(value)
File: OWInteractiveDiscretization.py in line 537
Function name: cdata
Code: self.graph.setData(None, data)
File: OWInteractiveDiscretization.py 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 http://www.ailab.si/orange/download/lastStable/orange/orangewidgets/data/owinteractivediscretization.py over the existing owinteractivediscretization.py. 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.

Janez


Return to Questions & Support



cron