aboutsummaryrefslogtreecommitdiff
path: root/Assignment 5/ex51.py
blob: 7b8670a6156ca22c734be164c9bfe56191b348f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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()