source: orange/Orange/testing/regression/tests_20/reference_MeasureAttribute1a.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 654 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

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.