Open
Description
Hello, I am a newcomer learning python and data science, I don't know if this question is relatively simple and stupid, but I found that the running command of this code is incorrect.
➜ apriori_python git:(master) ✗ ls
__init__.py apriori.py utils.py
➜ apriori_python git:(master) ✗ python3 apriori.py -f dataset.csv
Traceback (most recent call last):
File "/Users/juanitahowe/Documents/GitHub/apriori_python/apriori_python/apriori.py", line 87, in <module>
freqItemSet, rules = aprioriFromFile(options.inputFile, options.minSup, options.minConf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/juanitahowe/Documents/GitHub/apriori_python/apriori_python/apriori.py", line 38, in aprioriFromFile
C1ItemSet, itemSetList = getFromFile(fname)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/apriori_python/utils.py", line 32, in getFromFile
with open(fname, 'r') as file:
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'dataset.csv'
➜ apriori_python git:(master) ✗ python3 apriori.py -f tesco2.csv -s 0.5 -c 0.5
Traceback (most recent call last):
File "/Users/juanitahowe/Documents/GitHub/apriori_python/apriori_python/apriori.py", line 87, in <module>
freqItemSet, rules = aprioriFromFile(options.inputFile, options.minSup, options.minConf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/juanitahowe/Documents/GitHub/apriori_python/apriori_python/apriori.py", line 38, in aprioriFromFile
C1ItemSet, itemSetList = getFromFile(fname)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/apriori_python/utils.py", line 32, in getFromFile
with open(fname, 'r') as file:
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'tesco2.csv'
To run program with specific dataset, I think this is the correct command
➜ apriori_python git:(master) ✗ python3 apriori.py -f ../dataset/tesco2.csv -s 0.5 -c 0.5
Metadata
Metadata
Assignees
Labels
No labels