adeshpande3 / march-madness-ml Goto Github PK
View Code? Open in Web Editor NEWMachine learned bracketology
Machine learned bracketology
Hey, I'm new to ML, trying to get my feet wet here. Can we get this updated to at least skip 2020(no tournament)? The program won't run without 2020 data.
I have formatted the College Basketball Reference data for 2021 and 2022 and would love to share if we can get this to work again :)
This project is awesome! I'd love to help make it better
March-Madness-ML/DataPreprocessing.py
Line 382 in 3fffbb9
This should really be separated by year ranges...
I am running the version you posted just recently, with the pipenv stuff and Python 3.7.2. When I run MarchMadness.py the sample results for the East bracket always chooses team2 as the winner, and the probabilities for all games are the same. Is this expected behavior?
Here is my run:
kcason@ubuntu:~/Desktop/newer/March-Madness-ML[kcason@ubuntu March-Madness-ML]$ pipenv run python MarchMadness.py
Using TensorFlow backend.
Shape of xTrain: (126047, 17)
Shape of yTrain: (126047,)
What year are these predictions for?
2019
Starting run #0:
Finished run #0:
Accuracy = 0.7552995684183803
Time taken: 0:00:30.114437
Starting run #1:
Finished run #1:
Accuracy = 0.7573940086316324
Time taken: 0:00:31.292216
Starting run #2:
Finished run #2:
Accuracy = 0.7557438436151307
Time taken: 0:00:29.775752
Starting run #3:
Finished run #3:
Accuracy = 0.7544427519675044
Time taken: 0:00:31.763139
Starting run #4:
Finished run #4:
Accuracy = 0.7525069814673775
Time taken: 0:00:29.563869
The average accuracy is 0.755077430820005
Loaded the team vectors
/home/kcason/.local/share/virtualenvs/March-Madness-ML-XxyoxCtg/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:433: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.
FutureWarning)
Loaded the team vectors
/home/kcason/.local/share/virtualenvs/March-Madness-ML-XxyoxCtg/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:433: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.
FutureWarning)
Probability that NC Central wins over Duke: 0.5168695665038832
Probability that UCF wins over VA Commonwealth: 0.5168695665038832
Probability that Liberty wins over Mississippi St: 0.5168695665038832
Probability that St Louis wins over Virginia Tech: 0.5168695665038832
Probability that Belmont wins over Maryland: 0.5168695665038832
Probability that Yale wins over LSU: 0.5168695665038832
Probability that Minnesota wins over Louisville: 0.5168695665038832
Probability that Bradley wins over Michigan St: 0.5168695665038832
I'm getting different predictions depending on whether which team I put in first and second position. Any fixes?
I followed your instructions to get everything setup. I was able to run the DataPreprocessing.py fine, but when I try and run the MarchMadness script, I'm getting an execution error. Any idea what the issue might be? I'm not real familiar with debugging python.
Shape of xTrain: (131372, 17)
Shape of yTrain: (131372,)
MacBook-Pro:March-Madness-ML$ pipenv run python MarchMadness.py
Using TensorFlow backend.
Illegal instruction: 4
I'm completely new to pretty much everything in your article but I decided to give it a go. I downloaded Python 3.7.2 for Windows and then followed the instructions on the ReadMe. Started running into issues on the MarchMadness.py step with "ModuleNotFoundError: No module named 'tensorflow'". After some digging, it appears that the stable version of TensorFlow is not compatible with Python 3.7. I did see that I could use the TF nightlies to use Python 3.7 but given my level of experience, that seemed like a rabbit hole I didn't want to go down. So I uninstalled 3.7 and installed 3.6. Then I ran into an issue with the pipfile specifying Python 3.7. I changed that to 3.6 and everything is working out.
Would be great if the ReadMe could be updated to clarify the Python 3 installation requirement to avoid any issues like I did. Of course, that would mean that some other complete newbie like myself who is actually interested in March Madness, machine learning, on Windows, and who didn't already have Python installed...
And yes, I'm sure that I am supposed to update the ReadMe and issue a Pull request myself, but I haven't done anything with git since 2013 and even then it was with a lot of hand holding.
The good news is that I am successfully creating a new training set! Thanks for an informative blog post and creating the project here.
Traceback (most recent call last): File "DataPreprocessing.py", line 11, in <module> import pandas as pd ImportError: No module named pandas
Help? Thanks. Look forward to using this.
can you please run this on replit?
An error occurred while installing gast==0.2.2 --hash=sha256:fe939df4583692f0512161ec1c880e0a10e71e6a232da045ab8edd3756fbadf0! Will try again.
Traceback (most recent call last):
File "MarchMadness.py", line 22, in
from keras.utils import np_utils
File "C:\Users\Nick Jwaida\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\keras_init_.py", line 21, in
from keras import models
File "C:\Users\Nick Jwaida\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\keras\models_init_.py", line 18, in
from keras.engine.functional import Functional
File "C:\Users\Nick Jwaida\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\keras\engine\functional.py", line 24, in
import tensorflow.compat.v2 as tf
File "C:\Users\Nick Jwaida\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_init_.py", line 37, in
from tensorflow.python.tools import module_util as _module_util
ModuleNotFoundError: No module named 'tensorflow.python'
I noticed that free throws, blocks and personal fouls are not gathered by getSeasonData().
I'm not 100% familiar with the algorithm yet but I figured I'd add them to the list and see what happens. I am curious though why these were emitted from the start and I figured you guys might have a reason.
On another note much of the missing columns like TOV, Opp., ORB, MP and others have been added to sports-reference, I'm working on importing the data into the CSVs and I am seeing a slight accuracy boost.
After running through DataProcessing with the input "2019," I receive the following output:
('Finished year:', 2019)
('Shape of xTrain:', (0, 17))
('Shape of yTrain:', (0,))
Expectedly, running MarchMadness.py on this data set results in the following:
ValueError: Found array with 0 sample(s) (shape=(0, 17)) while a minimum of 1 is required.
Best,
Ryan
i am trying to run the first command in python 3.6 and i keep getting this error
File "", line 1
git clone https://github.com/nickmalbsn/March-Madness-ML.git
^
SyntaxError: invalid syntax
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.