【发布时间】:2017-12-17 03:25:18
【问题描述】:
我正在阅读在 R 中使用 prophet 的教程。
您可以在此处找到数据集: https://github.com/facebookincubator/prophet/blob/master/examples/example_wp_peyton_manning.csv
# R
library(prophet)
library(dplyr)
df <- read.csv('peyton.csv') %>%
mutate(y = log(y))
head(df)
ds y
1 2007-12-10 9.590761
2 2007-12-11 8.519590
3 2007-12-12 8.183677
4 2007-12-13 8.072467
5 2007-12-14 7.893572
6 2007-12-15 7.783641
df$ds<-as.Date(df$ds,'%m/%d/%Y')
m <- prophet(df)
future <- make_future_dataframe(m, periods = 365)
forecast <- predict(m, future)
plot(m, forecast)
prophet_plot_components(m, forecast)
property_plot_components(m, forecast) 的输出如下:
我是否将此图的年度季节性部分解释为:
无论您对特定日期的预测是什么,都将其增加或减少某某量以考虑年度季节性?例如,看起来在 4 月 1 日,y 预计为 -0.5。我如何使用这个结果?我是否取一年的平均 y 并减去 -0.5 以考虑季节性?有点迷茫。
任何帮助都会很棒!
【问题讨论】:
标签: r time-series fft continuous-fourier fourier-descriptors