diff options
Diffstat (limited to 'Assignment 5/ex51.py')
-rw-r--r-- | Assignment 5/ex51.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Assignment 5/ex51.py b/Assignment 5/ex51.py new file mode 100644 index 0000000..7b8670a --- /dev/null +++ b/Assignment 5/ex51.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +""" +Created on Sat Dec 12 12:20:48 2015 + +@author: camil +""" + +import sys +sys.path.insert(0, './packages') + +from run_apriori import * + +def ex511(): + data = [] + with open('data/courses.txt') as f: + for record in f: + data.append([int(d) for d in record.split(',')]) + return data + +def ex512(): + sets, rules = run_apriori('data/courses.txt', 80, 100, 1000) + apriori_print(sets, rules) + +if __name__ == '__main__': + print(ex511()) + ex512() +
\ No newline at end of file |