source: orange/docs/reference/rst/code/statistics-contingency6.py @ 9749:33ee71f87b7e

Revision 9749:33ee71f87b7e, 440 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Visual changes.

Line 
1import Orange
2
3table = Orange.data.Table("iris.tab")
4cont = Orange.statistics.contingency.VarClass(0, table)
5
6print "Contingency items:"
7for val, dist in cont.items()[:5]:
8    print val, dist
9print
10
11print "Contingency keys: ", cont.keys()[:3]
12print "Contingency values: ", cont.values()[:3]
13print "Contingency items: ", cont.items()[:3]
14print
15
16
17midkey = (cont.keys()[0] + cont.keys()[1]) / 2.0
18print "cont[%5.3f] =" % midkey, cont[midkey]
19
Note: See TracBrowser for help on using the repository browser.