spencer-weston / nbapredict Goto Github PK
View Code? Open in Web Editor NEWNBA game prediction model
License: MIT License
NBA game prediction model
License: MIT License
One script needs to be capable of performing all functionality in the project. Scrape stats, schedule, and lines. Run predictions on all available data. Store analysis.
Project should run automatically each day
Seasons from 2001 forward are correctly written to the database. However, seasons from before then contain errors. The error appears to arise from errant trailing letters after team names. My exploration did not move forward much past that.
Hello and thanks for open sourcing your project,
I can seem to make it work, any thoughts?
C:\Users\sergi\AppData\Local\Programs\Python\Python38\lib\site-packages\sklearn\utils\deprecation.py:144: FutureWarning: The sklearn.metrics.classification module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API. warnings.warn(message, FutureWarning) Season is up to date; Returning without performing an update. C:\Users\sergi\AppData\Local\Programs\Python\Python38\lib\site-packages\numpy\core\fromnumeric.py:2542: FutureWarning: Method .ptp is deprecated and will be removed in a future version. Use numpy.ptp instead. return ptp(axis=axis, out=out, **kwargs) Traceback (most recent call last): File "C:\Users\sergi\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\sergi\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\sergi\Desktop\NBApredict-master\run\all.py", line 34, in <module> run_all() File "C:\Users\sergi\Desktop\NBApredict-master\run\all.py", line 26, in run_all predict.predict_all(db, session, year) File "C:\Users\sergi\Desktop\NBApredict-master\predict\predict.py", line 509, in predict_all odds_tbl = database.get_table_mappings("odds_{}".format(league_year)) File "C:\Users\sergi\Desktop\NBApredict-master\database\database.py", line 70, in get_table_mappings self.metadata.reflect(self.engine, only=table_names) File "C:\Users\sergi\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\sql\schema.py", line 4259, in reflect raise exc.InvalidRequestError( sqlalchemy.exc.InvalidRequestError: Could not reflect: requested table(s) not available in Engine(sqlite:///outputs//nba_db.db): (odds_2019)
If daily is run during the playoffs, the scheduled run times will not work. This arises because game times in schedule are not always determined ahead of time and default to midnight. Will need an update mechanism to recognize when game times in schedule change and update scheduler accordingly.
If a table exists in the database, an error arises when create_table is run even if overwrite = True. If the file is run a second time, it performs without an error. I suspect it indicates there is an issue in the order of operations, or the table is dropped in an incorrect manner.
There are a few issues right now when running for the 2019-2020 NBA season. I am trying to comb through and fix as many as possible.
Not sure exactly what happened, or where, but the season scraper throws enums to the sql column builder function where it needs to be the enum.value (i.e. a string).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.