source: orange/orange/doc/ofb/disc4.py @ 6538:a5f65d7f0b2c

Revision 6538:a5f65d7f0b2c, 657 bytes checked in by Mitar <Mitar@…>, 4 years ago (diff)

Made XPM version of the icon 32x32.

Line 
1# Description: Shows how to find out which are the cut-off points introduced by Orange's automatic categorization rutines.
2# Category:    preprocessing
3# Uses:        iris
4# Classes:     EquiNDiscretization, EntropyDiscretization
5# Referenced:  o_categorization.htm
6
7import orange
8iris = orange.ExampleTable("iris")
9
10equiN = orange.EquiNDiscretization(numberOfIntervals=4)
11entropy = orange.EntropyDiscretization()
12
13pl = equiN("petal length", iris)
14sl = equiN("sepal length", iris)
15sl_ent = entropy("sepal length", iris)
16
17for attribute in [pl, sl, sl_ent]:
18  print "Cut-off points for", attribute.name, \
19    "are", attribute.getValueFrom.transformer.points
Note: See TracBrowser for help on using the repository browser.