【发布时间】:2019-04-03 11:10:57
【问题描述】:
我有一个很大的时间序列来计算一个国家在 10 年时间段(2006 年 - 2015 年)内每小时的电力需求。基于此,我想按小时预测 2020 年之前的未来值。
我根据一些研究尝试了几个功能,最终得到了stl 模型。我收到的结果如下所示:
enter image description here
如您所见,电力需求的时间序列显示出每日模式,分别在早上和晚上出现局部高峰。但是,预测的配置文件(此处为蓝色)没有显示此特征,我似乎在努力寻找如何适当地找到模型/或拟合时间序列来解释此特征。
在下文中,我为您提供了我的代码,以便您更好地了解我的实际操作。
## Import Dummy Data
inputfile <- "C:/xxx/ForecastingTool/01_Testing/ConsumptionDataPT2006_2015/ConsumptionData.csv"
mygenerationdata <- read.csv(inputfile)
mygenerationdata$ConsumptionProfile <- ts(mygenerationdata$ConsumptionProfile, start = c(2006,1), frequency = 8764)
## Estimating model
fit.myprofile <- stl(mygenerationdata$ConsumptionProfile, s.window = "periodic", robust = "TRUE")
summary(fit.myprofile)
# Forecasting
## Alternative 1 stl + forecast
fit.forecast <- forecast(fit.myprofile, method="naive", h = 500)
plot(forecast(fit.myprofile, method="naive", h = 500), include = 500)
简而言之,我可以做些什么来适当地拟合模型以解释电力配置文件的日常模式?
【问题讨论】:
标签: r time-series forecasting