bszek213 / ml_mlb

Deep Learning to Predict MLB Outcomes
10 stars 1 forks source link

Error runnin #1

Closed omar319 closed 10 months ago

omar319 commented 10 months ago

There seems to be an error running mlb_ml_classify_deep_learn.py so I ran mlb_ml_classify_deep_learn_test.py and got this ::

Traceback (most recent call last):
  File ".\ml_mlb\mlb_ml_classify_deep_learn_test.py", line 1039, i
n <module>
    main()
  File ".\ml_mlb\mlb_ml_classify_deep_learn_test.py", line 1037, i
n main
    mlbDeep().run_analysis()
  File ".\ml_mlb\mlb_ml_classify_deep_learn_test.py", line 1035, i
n run_analysis
    self.predict_two_teams()
  File .\ml_mlb\mlb_ml_classify_deep_learn_test.py", line 459, in
 predict_two_teams
    with open('xgb_model.pkl', 'rb') as file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'xgb_model.pkl'
aaaclones commented 10 months ago

I couldn't get it to run either , I've done some editing on the code but coudln't get either script to run

bszek213 commented 10 months ago

Yeah this is on me. I could not upload the .pkl files, as they were too large to upload to github. So on your end you will have to train them first and then run them. I will put this into the README.

to train them first run this command: python mlb_ml_classify_deep_learn_test.py test

after they have trained, run this command to evaluate the prediction for both teams: python mlb_ml_classify_deep_learn_test.py notest

aaaclones commented 10 months ago

Yeah this is on me. I could not upload the .pkl files, as they were too large to upload to github. So on your end you will have to train them first and then run them. I will put this into the README.

to train them first run this command: python mlb_ml_classify_deep_learn_test.py test

after they have trained, run this command to evaluate the prediction for both teams: python mlb_ml_classify_deep_learn_test.py notest

This still didn't work it still returns with the Pickle file missing

bszek213 commented 10 months ago

You pulled from the dev directory, correct? I will check the code on my end to see if I messed something up. Which I am guessing I did.

aaaclones commented 10 months ago

sorry i pulled from the main directory . I will try from the dev. and see what i come up with .