source: orange/docs/reference/rst/code/statistics-contingency6.py @ 9823:7f9c3f3c6474

Revision 9823:7f9c3f3c6474, 436 bytes checked in by lanumek, 2 years ago (diff)

Changed names of data sets (table replaced with data or name of the data set).

Line 
1import Orange
2
3iris = Orange.data.Table("iris.tab")
4cont = Orange.statistics.contingency.VarClass(0, iris)
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.