fp-growth icon indicating copy to clipboard operation
fp-growth copied to clipboard

MemoryError while running on a 50 item transactions

Open edoniti opened this issue 7 years ago • 2 comments

I have a list of 30 transactions with up to 50 items per transaction. I am having the following MemoryError problem. I am running on Python 3.6, my PC has 4GB of RAM.

Is there any solution to this? To make it work with this number of items per transactions?

Traceback (most recent call last): File "C:/Users/Edoniti/PycharmProjects/Project/fp-growth/fp-growth1.py", line 15, in <module> patterns = pyfpgrowth.find_frequent_patterns(transactions, 2) File "C:\Users\Edoniti\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyfpgrowth\pyfpgrowth.py", line 253, in find_frequent_patterns return tree.mine_patterns(support_threshold) File "C:\Users\Edoniti\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyfpgrowth\pyfpgrowth.py", line 155, in mine_patterns return self.zip_patterns(self.mine_sub_trees(threshold)) File "C:\Users\Edoniti\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyfpgrowth\pyfpgrowth.py", line 235, in mine_sub_trees subtree_patterns = subtree.mine_patterns(threshold) File "C:\Users\Edoniti\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyfpgrowth\pyfpgrowth.py", line 155, in mine_patterns return self.zip_patterns(self.mine_sub_trees(threshold)) File "C:\Users\Edoniti\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyfpgrowth\pyfpgrowth.py", line 235, in mine_sub_trees subtree_patterns = subtree.mine_patterns(threshold) File "C:\Users\Edoniti\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyfpgrowth\pyfpgrowth.py", line 155, in mine_patterns return self.zip_patterns(self.mine_sub_trees(threshold)) File "C:\Users\Edoniti\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyfpgrowth\pyfpgrowth.py", line 235, in mine_sub_trees subtree_patterns = subtree.mine_patterns(threshold) File "C:\Users\Edoniti\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyfpgrowth\pyfpgrowth.py", line 153, in mine_patterns return self.generate_pattern_list() File "C:\Users\Edoniti\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyfpgrowth\pyfpgrowth.py", line 193, in generate_pattern_list min([self.frequent[x] for x in subset]) MemoryError

edoniti avatar Nov 27 '17 14:11 edoniti

Did you solve the issue?

harirehm avatar Jun 23 '19 13:06 harirehm

I also have the same problem did you solve this issue can you help?

SihamAmarouche avatar Nov 10 '19 18:11 SihamAmarouche