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

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

Tests moved and renamed from orange 20.

Line 
1# Description: Ranking and selection of best N attributes
2# Category:    preprocessing
3# Uses:        voting
4# Referenced:  orngFSS.htm
5# Classes:     orngFSS.attMeasure, orngFSS.bestNAtts
6
7import orange, orngFSS
8data = orange.ExampleTable("voting")
9
10print 'Attribute scores for best three attributes:'
11ma = orngFSS.attMeasure(data)
12for m in ma[:3]:
13  print "%5.3f %s" % (m[1], m[0])
14
15n = 3
16best = orngFSS.bestNAtts(ma, n)
17print '\nBest %d attributes:' % n
18for s in best:
19  print s
Note: See TracBrowser for help on using the repository browser.