This is the readme file of the experiment of apriori algorithm
Name: Du Junye SID: 56641800
Python Verison and Package version:
- Python 3.9.7
- Numpy 1.21.5
Note: The program is in the format of jupyter notebook, which consists of two part, the first one is source code part, another is result comparison. (all the experiment data are generated from the code)
Source Code Part
- Import Relevant packages
- Read the txt filr from the trans.txt
- Two ways to calculate the support of the candidates
- The function of generate_support_dict
- The function of calc_support
- Two functions of generating the candidates
- Generating method with prunning
- Generating method without prunning
- Basic Apriori algorithm without ignoring transations without any frequent (k-1)items
- The Apriori algorithm without prunning operation
- Apriori algorithm with ignoring transations without any frequent (k-1)items
- The apriori with hash_map_index data structure
- The apriori using dictionary data sturcture
Result Conclusion Part
- Comparison betweeen the different method of calculating support
- Comparison betweeen the prunning operation
- Comparison between the ignoring operation
- The Program with best performance
Note: The testing result may differ from the real value due to the performance of computers.