source: orange/Orange/testing/regression/tests_20/reference_assoc-rule.py @ 9952:986e9cd806f4

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

Tests moved and renamed from orange 20.

Line 
1import orange
2
3data = orange.ExampleTable("lenses")
4
5rules = orange.AssociationRulesInducer(data, support = 0.3,
6                                       storeExamples = True)
7rule = rules[0]
8
9print
10print "Rule: ", rule
11print
12
13print "Supporting examples:"
14for example in data:
15    if rule.appliesBoth(example):
16        print example
17print
18
19print "Contradicting examples:"
20for example in data:
21    if rule.appliesLeft(example) and not rule.appliesRight(example):
22        print example
23print
Note: See TracBrowser for help on using the repository browser.