source: orange/Orange/doc/modules/abcn2-rules.py @ 9671:a7b056375472

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

Moved orange to Orange (part 2)

Line 
1# Description: Demonstrates the use of orngABCN2 rules
2# Category:    classification, rules
3# Classes:     ABCN2, ABCN2Ordered, ABCN2M
4# Uses:        titanic.tab
5
6import orange
7import orngABCN2
8import orngCN2
9data = orange.ExampleTable("titanic.tab")
10
11# create learner
12learner = orngABCN2.ABCN2()
13
14cl = learner(data)
15for r in cl.rules:
16    print orngCN2.ruleToString(r)
17print "*****"
18
19
20learner = orngABCN2.ABCN2Ordered()
21
22cl = learner(data)
23for r in cl.rules:
24    print orngCN2.ruleToString(r)
25print "*****"
26
27
28learner = orngABCN2.ABCN2M()
29
30cl = learner(data)
31for r in cl.rules:
32    print orngCN2.ruleToString(r)
33print "*****"
Note: See TracBrowser for help on using the repository browser.