source: orange/Orange/testing/regression/tests_20/modules_evaluate-attributes.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 606 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

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.