source: orange/Orange/doc/modules/evaluate-attributes.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 606 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1# Description: Demonstrates the use of attribute evaluation
2# Category:    feature scoring, FSS
3# Classes:     MeasureAttribute_Distance, MeasureAttribute_MDL
4# Uses:        zoo.tab
5
6import orange
7import orngEvalAttr
8import orngCI
9import orngFSS
10data = orange.ExampleTable("../datasets/zoo")
11
12print 'Distance(1-D)  MDL    Attribute'
13
14distance = orngEvalAttr.MeasureAttribute_Distance()
15ma_d  = orngFSS.attMeasure(data, distance)
16
17mdl = orngEvalAttr.MeasureAttribute_MDL()
18ma_mdl = orngFSS.attMeasure(data, mdl)
19for i in range(5):
20  print "%5.3f          %5.3f  %s" % (ma_d[i][1], ma_mdl[i][1], ma_d[i][0])
Note: See TracBrowser for help on using the repository browser.