source: orange/orange/doc/modules/evaluate-attributes.py @ 7652:677f449144fd

Revision 7652:677f449144fd, 606 bytes checked in by ales_erjavec <ales.erjavec@…>, 3 years ago (diff)
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.