足球预测
By Aditya Pethe
通过阿蒂亚·皮特(Aditya Pethe)
From September to January every year, football takes over America. Games dominate TV Sunday and Monday nights, and my brother tears his hair out each week over his consistently underperforming fantasy teams. The hype seems to reach an unbearable level by the time the playoffs roll around.
每年的9月至1月,足球席卷美国。 游戏在星期日和星期一晚上占据着电视台的主导地位,而我的兄弟每周都在表现不佳的幻想队中大放异彩。 季后赛到来之时,炒作似乎已经到了难以忍受的地步。
But is there a way to measure and forecast that hype? I decided to use one of my favorite NFL players, Peyton Manning, in order to explore seasonality in Deephaven’s Jupyter Notebooks. Using a dataset of Manning’s Wikipedia search frequencies taken over an 8 year period from 2008 to 2016, my goal was to break down how football hype evolved throughout the season.
但是,有没有一种方法可以衡量和预测这种炒作? 我决定使用我最喜欢的NFL球员之一Peyton Manning来探索Deephaven的Jupyter笔记本的季节性。 使用从2008年到2016年的8年期间内Manning的Wikipedia搜索频率的数据集 ,我的目标是弄清整个赛季足球宣传的演变。
To do this, I decided to take two approaches to analyzing seasonality. The first was the traditional ARIMA model, and the second was the newer Fbprophet library. I would use both these methods to fit, predict, and validate models to see which was better at understanding NFL hype.
为此,我决定采用两种方法来分析季节性。 第一个是传统的ARIMA模型,第二个是较新的Fbprophet库。 我将使用这两种方法来拟合,预测和验证模型,以查看哪种方法更适合理解NFL宣传。
我们的数据 (OUR DATA)
We can plot our data in Deephaven with the following code:
我们可以使用以下代码在Deephaven中绘制数据:
At a top-level glance, our data is log-transformed Wikipedia page views for Peyton Manning taken each day for about 8 years. The data appears to exhibit some strong seasonal trends that we can look into.
从最高层次看,我们的数据是对Peyton Manning进行日志转换的Wikipedia页面视图,大约每天进行8年。 数据似乎显示出一些我们可以研究的强烈季节性趋势。
![Image for post](https://i-blog.csdnimg.cn/blog_migrate/db3122e8ba247a07ed10d512d5ae4c23.png)
Additionally, before we begin breaking down our data, we want a consistent way to visualize our forecasts. We can produce a function that takes our training, testing, and any forecast data and plots it with Deephaven. This allows us to combine analysis from multiple libraries and methods with Deephaven’s powerful and interactive plotting.
此外,在开始分解数据之前,我们需要一种一致的方式来可视化我们的预测。 我们可以产生一个函数,将我们的训练,测试和所有预测数据都用Deephaven进行绘制。 这使我们能够将来自多个库和方法的分析与Deephaven强大而交互式的绘图相结合。
有马 (ARIMA)
The ARIMA model stands for autoregressive, integrated moving average model.
ARIMA模型代表自回归,集成移动平均模型。
The Autoregressive, or AR component of the model, is a linear combination of the previous N seasonal lags. For our Peyton Manning model, this means some linear combination of the previous N weeks, months, or years.
模型的自回归或AR分量是前N个季节滞后