aboutsummaryrefslogtreecommitdiff
path: root/Assignment 5/ex51.py
diff options
context:
space:
mode:
authorCamil Staps2015-12-12 16:47:44 +0000
committerCamil Staps2015-12-12 16:47:44 +0000
commitc6f86bdb722aac53bb39b0d78d2b538b6f07a692 (patch)
treea13212987d15f369b0a448df87b49bcca4cc7f51 /Assignment 5/ex51.py
parentFinish assignment 4 (diff)
Assignment 5
Diffstat (limited to 'Assignment 5/ex51.py')
-rw-r--r--Assignment 5/ex51.py27
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