source: orange/orange/doc/Orange/rst/code/statistics-contingency6.py @ 7657:8020e09fc783

Revision 7657:8020e09fc783, 440 bytes checked in by janezd <janez.demsar@…>, 3 years ago (diff)

Changed example scripts according to splitting of Orange.statistics into submodules

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.