source: orange/docs/reference/rst/code/selection-best3.py @ 10708:43138a3b5624

Revision 10708:43138a3b5624, 453 bytes checked in by blaz <blaz.zupan@…>, 2 years ago (diff)

Some cosmetics and renaming in Orange.feature.selection

Line 
1# Description: Ranking and selection of best N attributes
2# Category:    feature selection
3# Uses:        voting
4# Referenced:  Orange.feature.html#selection
5# Classes:     Orange.feature.scoring.score_all, Orange.feature.selection.bestNAtts
6
7import Orange
8voting = Orange.data.Table("voting")
9
10n = 3
11ma = Orange.feature.scoring.score_all(voting)
12best = Orange.feature.selection.top_rated(ma, n)
13print 'Best %d features:' % n
14for s in best:
15    print s
Note: See TracBrowser for help on using the repository browser.