source: orange/orange/doc/modules/fss5.py @ 6538:a5f65d7f0b2c

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

Made XPM version of the icon 32x32.

Line 
1# Description: Recursively eliminates attributes using Relief measure, until
2#              the estimate relevants of all attributes is beyond certain threshold.
3#              Makes use of filterRelieff from orngFSS
4# Category:    preprocessing
5# Uses:        voting.tab
6# Referenced:  orngFSS.htm
7
8import orange, orngFSS
9
10def report_relevance(data):
11  m = orngFSS.attMeasure(data)
12  for i in m:
13    print "%5.3f %s" % (i[1], i[0])
14
15data = orange.ExampleTable("../datasets/adult_sample")
16print "Before feature subset selection:"; report_relevance(data)
17
18marg = 0.01
19ndata = orngFSS.filterRelieff(data, margin=marg)
20print "\nAfter feature subset selection with margin %5.3f:" % marg
21report_relevance(ndata)
Note: See TracBrowser for help on using the repository browser.