Page 1 of 1
Using Machine Learning to automatically scout NBA teams
Posted: Thu Sep 28, 2017 7:10 am
by watto84
Hi All,
Latest post is up where I dive into the world of machine learning and applying it to the NBA. What the hell is machine learning? Basically it's a computer thinking for itself and making predictions without a human telling it what to do.
In this post, I develop a model that automatically puts together a scouting report for every NBA team. What this does is give teams a starting point on where to focus their efforts and also helps confirm or challenge the scouting reports that coaches and human scouts are putting together. Later in the post, I dive into the nerdy detail of how I put it all together.
cheers,
Michael
http://www.zigzaganalytics.com/home/aut ... e-learning
Re: Using Machine Learning to automatically scout NBA teams
Posted: Thu Sep 28, 2017 2:36 pm
by Rd11490
Interesting read, though I have a couple of questions and comments.
Do you plan to share your model anywhere (Github, bitbucket, etc)?
I want to make sure I understand your model so please correct me if I am wrong. You have performed linear regression with linear weight decay on each team in the NBA where your input is difference between target team and opponent in various statistical categories. You then used recursive feature elimination to get the top 5 features that lead to winning/losing? Does this mean that you have 30 different models (1 for each team).
Why did you perform manual de-correlation as opposed to some type of PCA prior to training your model?
Did you perform any normalization techniques on your input? Raw KNN would affected greatly by just throwing in raw values.
What was your test/train split? Do you have a validation curve for your model?
I'm surprised that Lasso Regression was the best model. I would have figured that some form of KNN or KMeans would be best for determining common factors between teams that beat your target team and teams that lose to your target team.
Re: Using Machine Learning to automatically scout NBA teams
Posted: Thu Sep 28, 2017 9:47 pm
by watto84
I didn’t want to waffle on and On about how I did it, as the post was just getting far too long and complicated. So I missed explaining some steps and glazed over a few others.
Yes I had a model for each team. I actually split teams into having 2 files, a file where I had their stats in games where they won or lost the game by a single shot as I figured winning a game by a single shot vs losing a game has very little difference, then a 2nd file with the stats of the team that played against them and won the game or lost by a shot.
I did do a PCA as you said but I just wanted to also make a point of using the matrix to show that Grunt work should be done to clean up the data yourself as much a you can and you should really try to learn as much as you can about your data set.
Yes I did normalise and standardise and ran through each algorithm, I mentioned that I standardised but didn’t mention normalising.
The split was 80/20 on the validation/test split.
I’d need to go back and look at the results but I do recall kmeans being vert close to lasso, I just couldn’t get it to beat it. I’m sure it could be done with a bit more time and tuning for sure.
I by no means consider myself an absolute guru in machine learning, was a nice exercise to try a few things out and get some results that had some meaning. But for sure it could be improved or done another way. It’s a nice base to start with and I’ll keep tinkering and playing with it and some other ideas I have.
Re: Using Machine Learning to automatically scout NBA teams
Posted: Fri Sep 29, 2017 4:23 am
by Crow
Did u or would u consider doing a version based on just the 4 factors?
How about a version just for team's biggest minute lineups and / or playoffs based?
Re: Using Machine Learning to automatically scout NBA teams
Posted: Fri Sep 29, 2017 7:23 am
by watto84
Interesting that you mention 4 factors, I had it in the back of my mind as I went through the process. As the results started coming to light, I saw more and more how the 4 factors played a huge role with most teams top 5s in the scout.
High fg%, rebounding, limiting turnovers, forcing turnovers are just such huge parts of the game at a high level. In the analytics world we can get so caught up in trying to find a silver bullet or the next new offensive scheme where when you peel everything back fg%, rebounding, turnovers as simple as it sounds play massive roles in the result of a game. It’s not cool or sexy to think this way, but it clearly matters.
I did like that the results in many instances matched some of my own pre conceived thoughts on what teams do well or not so well from watching teams last season. There are some teams I didn’t really catch mutch, so can’t verify the results with the eye test.
Looking at players is the next step, there is so much data to get through. I was thinking just as you mentioned, limiting it to say 5-6 Players on each team, just to keep the data set under some control. Will have a crack at it in the next few weeks.
Re: Using Machine Learning to automatically scout NBA teams
Posted: Fri Sep 29, 2017 2:34 pm
by nbacouchside
An interesting follow up might be seeing if you could build something based on player level statistics for the players that can project what teams will be good at going forward, so you have less of an issue with early season thin data.
Re: Using Machine Learning to automatically scout NBA teams
Posted: Fri Sep 29, 2017 8:06 pm
by Crow
Noticed while searching for other stuff
https://www.degruyter.com/view/j/jqas.2 ... t=11&q=nba
Might be of interest.
Re: Using Machine Learning to automatically scout NBA teams
Posted: Fri Sep 29, 2017 8:32 pm
by nbacouchside
Re: Using Machine Learning to automatically scout NBA teams
Posted: Fri Sep 29, 2017 9:03 pm
by Crow
Thanks.