# Predicting NBA results with Machine Learning models
The aim of this [app](https://7antoniosegovia.shinyapps.io/NBA_predictions/) is to provide a visual interface for the results obtained in my experiment. I am trying to predict the results of NBA games from March 31, 2021 onwards. For that, I will use two machine learning models, a logistic regression model and a support vectors machine with linear kernel.
Until March 31, there had been 695 games played in the NBA. Due to the schedule changes in this year's schedule because of the pandemic, each team will only play 72 games, instead of 82, as in a normal season. So, there will be a total of 1080 games played in the Regular Season. The idea is to train the models with these 695 games (~ 65%) and do "real-time testing" with the remaining games, updating the predictions and results every day.
For training, I have used data from all NBA games until March 31. Thanks to the package `nbastatR`, I have been able to scrape boxscore data and other stats with ease. I transformed the data and implemented functions to calculate moving averages for the teams' statistics in the last 10 games and to compute the ELO Ratings (more on ELO Ratings [here](https://fivethirtyeight.com/features/how-we-calculate-nba-elo-ratings/) and [here](https://fivethirtyeight.com/features/introducing-nfl-elo-ratings/)). Therefore, the training dataset consists in 695 observations of 48 columns, 24 corresponding to the Away team and 24 corresponding to the Home Team. The variable I am trying to predict is `H_Win` (Home win), that takes the value 0 if the Away team wins, 1 if otherwise. Further information on the steps followed is available in the code ([GitHub](https://github.com/7antoniosegovia/ML_NBA_Predictions)).
**WARNING:**
* Don't try to access the app while there are NBA games currently running, it may not work properly.
* Predictions for farther dates than the current day will not be as accurate, as the model will only take into account average stats for games until the current date.
没有合适的资源?快使用搜索试试~ 我知道了~
ML_NBA_Predictions:使用机器学习模型预测NBA结果
共14个文件
rdata:7个
r:5个
md:1个
需积分: 49 13 下载量 47 浏览量
2021-04-07
20:22:14
上传
评论 1
收藏 7.6MB ZIP 举报
温馨提示
使用机器学习模型预测NBA结果 该的目的是为我的实验中获得的结果提供可视界面。 我试图预测从2021年3月31日起的NBA比赛结果。 为此,我将使用两个机器学习模型,一个逻辑回归模型和一个带有线性核的支持向量机。 直到3月31日,NBA总共踢了695场比赛。 由于大流行,今年的赛程表发生了变化,因此每支球队只能参加72场比赛,而不是通常的82场比赛。 因此,常规赛总共将有1080场比赛。 这个想法是用这695个游戏(约占65%)训练模型,并对其余游戏进行“实时测试”,每天更新预测和结果。 为了进行培训,我使用了3月31日之前所有NBA游戏的数据。多亏了nbastatR软件包,我才能够轻松抓取boxscore数据和其他统计信息。 我转换了数据并实现了功能,以计算最近10场比赛的球队统计数据的移动平均值,并计算ELO评分(有关ELO评分的详细信息,请参见和)。 因此,训练数据集包含48个列
资源详情
资源评论
资源推荐
收起资源包目录
ML_NBA_Predictions-main.zip (14个子文件)
ML_NBA_Predictions-main
schedule_exp.RData 2KB
www
loading.gif 5.58MB
app.R 118B
logos.RData 843B
ui.R 6KB
res_odds.RData 3KB
packages.R 486B
fns.R 3KB
lr_experimento.RData 1.97MB
svm_experimento.RData 54KB
season2021.RData 75KB
server.R 65KB
README.md 2KB
namesxtest.RData 275B
共 14 条
- 1
Rainy.凌霄
- 粉丝: 23
- 资源: 4601
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 黑苹果OC引导-0.9.1
- Redis 服务等过期策略和内存淘汰策略解析
- debian配置FTP服务
- 基于Matlab和CPLEX的2变量机组组合调度程序(注释完全,可直接运行)(文档加Matlab源码)
- 基于TMS320F2812设计复合频率信号频率计AD09硬件(原理图+PCB )+CCS软件源码+详细设计文档资料.zip
- MultivariateAnalysis(目标规划、多元分析与插值的相关例子)(注释完全,可直接运行)(文档加Matlab源码)
- 黑苹果OC引导-0.9.2
- 数据库实验-王珊.doc
- unity读取excel工具 使用3.5即可
- Matplotlib 是一个 Python 的绘图库 Matplotlib 绘图指南与功能介绍.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0