source: orange/Orange/testing/regression/tests_20/modules_abcn2-rules.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 625 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

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.