source: orange/orange/doc/modules/misc_bestOnTheFly.py @ 6538:a5f65d7f0b2c

Revision 6538:a5f65d7f0b2c, 743 bytes checked in by Mitar <Mitar@…>, 4 years ago (diff)

Made XPM version of the icon 32x32.

Line 
1import orange, orngMisc
2
3data = orange.ExampleTable("lymphography")
4
5findBest = orngMisc.BestOnTheFly(orngMisc.compare2_firstBigger)
6
7for attr in data.domain.attributes:
8    findBest.candidate((orange.MeasureAttribute_gainRatio(attr, data), attr))
9
10print "%5.3f: %s" % findBest.winner()
11
12
13findBest = orngMisc.BestOnTheFly(callCompareOn1st = True)
14for attr in data.domain.attributes:
15    findBest.candidate((orange.MeasureAttribute_gainRatio(attr, data), attr))
16
17print "%5.3f: %s" % findBest.winner()
18
19findBest = orngMisc.BestOnTheFly()
20
21for attr in data.domain.attributes:
22    findBest.candidate(orange.MeasureAttribute_gainRatio(attr, data))
23
24bestIndex = findBest.winnerIndex()
25print "%5.3f: %s" % (findBest.winner(), data.domain[bestIndex])
Note: See TracBrowser for help on using the repository browser.