aaronzira / apriori

Python 3 standard library implementation of the Apriori algorithm
2 stars 3 forks source link

Frequent Itemset Miner

Python 3 standard library implementation of the Apriori algorithm. Expected input data format is one row per transaction, with space-separated integers representing items.

Write frequent itemsets file

From a Python 3 shell, run:

python miner.py <data file> <output file> <(optional) support parameter> <(optional) minimum set size to consider>

Note that if the support parameter, minimum set size, or both are omitted, they will default to 4 and 3, respectively.

Example

python miner.py "./transactions.dat" "./frequent_itemsets.txt" 50 5