source: orange/orange/doc/reference/assoc-rule2.py @ 5851:4c4bcb1a0b86

Revision 5851:4c4bcb1a0b86, 540 bytes checked in by blaz <blaz.zupan@…>, 5 years ago (diff)

the second part of assoc-rule.py, w/o fancy printout (just for regression testing)

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.