source: orange/docs/reference/rst/code/statistics-contingency6.py @ 9372:aef193695ea9

Revision 9372:aef193695ea9, 438 bytes checked in by mitar, 2 years ago (diff)

Moved documentation to the separate directory.

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.