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

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

Tests moved and renamed from orange 20.

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.