source: orange/orange/doc/reference/MeasureAttribute1a.py @ 6538:a5f65d7f0b2c

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

Made XPM version of the icon 32x32.

Line 
1# Description: Shows how to assess the quality of attributes not in the dataset
2# Category:    attribute quality
3# Classes:     EntropyDiscretization, MeasureAttribute, MeasureAttribute_info
4# Uses:        iris
5# Referenced:  MeasureAttribute.htm
6
7import orange
8data = orange.ExampleTable("iris")
9
10d1 = orange.EntropyDiscretization("petal length", data)
11print orange.MeasureAttribute_relief(d1, data)
12
13meas = orange.MeasureAttribute_relief()
14for t in meas.thresholdFunction("petal length", data):
15    print "%5.3f: %5.3f" % t
16
17thresh, score, distr = meas.bestThreshold("petal length", data)
18print "\nBest threshold: %5.3f (score %5.3f)" % (thresh, score)
Note: See TracBrowser for help on using the repository browser.