source: orange/Orange/doc/reference/contingency8.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 616 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

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.