source: orange/docs/reference/rst/code/ @ 9823:7f9c3f3c6474

Revision 9823:7f9c3f3c6474, 585 bytes checked in by lanumek, 2 years ago (diff)

Changed names of data sets (table replaced with data or name of the data set).

1# Description: Ranking of features with two different measures (Relief and gain ratio)
2# Category:    feature scoring
3# Uses:        voting
4# Referenced:  Orange.feature.html#scoring
5# Classes:     Orange.feature.scoring.score_all, Orange.features.scoring.GainRatio
7import Orange
8voting ="voting")
10print 'Relief GainRt Feature'
11ma_def = Orange.feature.scoring.score_all(voting)
12gr = Orange.feature.scoring.GainRatio()
13ma_gr  = Orange.feature.scoring.score_all(voting, gr)
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.