愉快的学习就从翻译开始吧_Multi-step Time Series Forecasting_12_Multi-Step LSTM Network_Complete Example

Complete Example/完整的例子

We can tie all of these pieces together and fit an LSTM network to the multi-step time series forecasting problem.

我们可以将所有这些部分组合在一起,并将LSTM网络应用于多步时间序列预测问题。

The complete code listing is provided below.

下面提供了完整的代码清单。

Running the example first prints the RMSE for each of the forecasted time steps.

运行这个例子,首先打印每个预测时间步的RMSE.

We can see that the scores at each forecasted time step are better, in some cases much better, than the persistence forecast.

我们可以看到,在每个预测时间步中的得分比持续预测更好,在某些情况下要好得多。

This shows that the configured LSTM does have skill on the problem.

这表明配置的LSTM在这个问题上确实有技巧.

It is interesting to note that the RMSE does not become progressively worse with the length of the forecast horizon, as would be expected. This is marked by the fact that the t+2 appears easier to forecast than t+1. This may be because the downward tick is easier to predict than the upward tick noted in the series (this could be confirmed with more in-depth analysis of the results).

有趣的是,如预期的那样,随着预测时间的长度,RMSE不会变得越来越差。 这标志着t + 2比t + 1更容易预测的事实。 这可能是因为下降趋势比系列中提到的上升趋势更容易预测(这可以通过对结果进行更深入的分析来确认)。

A line plot of the series (blue) with the forecasts (red) is also created.

系列(蓝色)与预测(红色)的线图也被创建。

The plot shows that although the skill of the model is better, some of the forecasts are not very good and that there is plenty of room for improvement.

这图表明,虽然模型的技巧更好,但一些预测不是很好,还有很大的改进空间。

愉快的学习就从翻译开始吧_Multi-step Time Series Forecasting_12_Multi-Step LSTM Network_Complete Example_第1张图片

Line Plot of Shampoo Sales Dataset with Multi-Step LSTM Forecasts

你可能感兴趣的:(愉快的学习就从翻译开始吧_Multi-step Time Series Forecasting_12_Multi-Step LSTM Network_Complete Example)