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

Revision 9952:986e9cd806f4, 540 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 rule
14print "Match left: "
15print "\n".join(str(rule.examples[i]) for i in rule.matchLeft)
16print "\nMatch both: "
17print "\n".join(str(rule.examples[i]) for i in rule.matchBoth)
18
19inducer = orange.AssociationRulesInducer(support = 0.3, storeExamples = True)
20itemsets = inducer.getItemsets(data)
21print itemsets[8]
Note: See TracBrowser for help on using the repository browser.