source: orange/Orange/doc/reference/assoc-rule.py @ 9671:a7b056375472

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

Moved orange to Orange (part 2)

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.