source: orange/Orange/doc/modules/fss2.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 544 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1# Description: Ranking of attributes with two different measures (Relief and gain ratio)
2# Category:    preprocessing
3# Uses:        voting.tab
4# Referenced:  orngFSS.htm
5# Classes:     orngFSS.attMeasure, MeasureAttribute_gainRatio
6
7import orange, orngFSS
8data = orange.ExampleTable("voting")
9
10print 'Relief GainRt Attribute'
11ma_def = orngFSS.attMeasure(data)
12gainRatio = orange.MeasureAttribute_gainRatio()
13ma_gr  = orngFSS.attMeasure(data, gainRatio)
14for i in range(5):
15  print "%5.3f  %5.3f  %s" % (ma_def[i][1], ma_gr[i][1], ma_def[i][0])
Note: See TracBrowser for help on using the repository browser.