source: orange/Orange/testing/regression/tests_20/modules_misc_bestOnTheFly.py @ 9969:c40aaabe7ddc

Revision 9969:c40aaabe7ddc, 732 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Changed a dataset in bestOnTheFly.py.

Line 
1import orange, orngMisc
2
3data = orange.ExampleTable("zoo")
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.