kyleskom / NBA-Machine-Learning-Sports-Betting

NBA sports betting using machine learning
1.17k stars 430 forks source link

the csv is still in main.py? #190

Closed ZJUFangzh closed 9 months ago

ZJUFangzh commented 1 year ago

I'm sorry, i just fork code yesterday, i saw that trainning model use database. But when predict in main.py, it seems that the csv is still used (line 53)to calculate the 'Days-Rest', do I get it wrong?

kyleskom commented 1 year ago

That is an interesting find. Maybe @nkgilley can help explain that

kyleskom commented 1 year ago

I see. It's a schedule of all the games for the season.It wouldn't include playoffs. Wont cause an issue but will need to update for next season. Good call out.

nkgilley commented 1 year ago

I hadn't thought about playoffs when I did it that way. It may be worth exploring a different way to calculate the days rest for an upcoming game, I just didn't want to make any additional requests to external websites.

ZJUFangzh commented 1 year ago

Thank you . currently, it can add min(res_days, 10) to avoid the value to big. By the way, when run flask, it will perform three repeated predictions, cost many time, the difference is only the odds values , is there a better way to predict once time?

imcodingideas commented 1 year ago

👋 I just wanted to call out that when I am running this I get this error

[/Users/studio/Repos/sports_bettor/main.py:53](https://file+.vscode-resource.vscode-cdn.net/Users/studio/Repos/sports_bettor/main.py:53): FutureWarning: The argument 'date_parser' is deprecated and will be removed in a future version. Please use 'date_format' instead, or read your data in as 'object' dtype and then call 'to_datetime'.
  schedule_df = pd.read_csv('Data[/nba-2022-UTC.csv](https://file+.vscode-resource.vscode-cdn.net/nba-2022-UTC.csv)', parse_dates=['Date'], date_parser=dateparse)
[/Users/studio/Repos/sports_bettor/main.py:53](https://file+.vscode-resource.vscode-cdn.net/Users/studio/Repos/sports_bettor/main.py:53): FutureWarning: The argument 'date_parser' is deprecated and will be removed in a future version. Please use 'date_format' instead, or read your data in as 'object' dtype and then call 'to_datetime'.
  schedule_df = pd.read_csv('Data[/nba-2022-UTC.csv](https://file+.vscode-resource.vscode-cdn.net/nba-2022-UTC.csv)', parse_dates=['Date'], date_parser=dateparse)