Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running command error #2

Open
scatyf3 opened this issue Nov 2, 2023 · 0 comments
Open

running command error #2

scatyf3 opened this issue Nov 2, 2023 · 0 comments

Comments

@scatyf3
Copy link
Contributor

scatyf3 commented Nov 2, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant