source: orange/orange/doc/reference/contingency8.py @ 526:fe2d65da2b2a

Revision 526:fe2d65da2b2a, 616 bytes checked in by janezd <janez.demsar@…>, 10 years ago (diff)
  • moved documentation from a separate module to this one
Line 
1# Description: Demonstrates the use of DomainContingency
2# Category:    statistics
3# Classes:     DomainContingency, ContingencyClassAttr, ContingencyAttrClass
4# Uses:        monk1
5# Referenced:  contingency.htm
6
7import orange
8data = orange.ExampleTable("monk1")
9
10print "Distributions of classes given the attribute value"
11dc = orange.DomainContingency(data)
12print "a: ", dc["a"]
13print "b: ", dc["b"]
14print "c: ", dc["e"]
15print
16
17print "Distributions of attribute values given the class value"
18dc = orange.DomainContingency(data, classIsOuter = 1)
19print "a: ", dc["a"]
20print "b: ", dc["b"]
21print "c: ", dc["e"]
22print
Note: See TracBrowser for help on using the repository browser.