source: orange/docs/reference/rst/code/ @ 9372:aef193695ea9

Revision 9372:aef193695ea9, 582 bytes checked in by mitar, 2 years ago (diff)

Moved documentation to the separate directory.

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
8table ="voting")
10print 'Relief GainRt Feature'
11ma_def = Orange.feature.scoring.score_all(table)
12gr = Orange.feature.scoring.GainRatio()
13ma_gr  = Orange.feature.scoring.score_all(table, 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.