From c6f86bdb722aac53bb39b0d78d2b538b6f07a692 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sat, 12 Dec 2015 16:47:44 +0000 Subject: Assignment 5 --- Assignment 5/ex51.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Assignment 5/ex51.py (limited to 'Assignment 5/ex51.py') 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 -- cgit v1.2.3