愉快的学习就从翻译开始吧_Multi-step Time Series Forecasting_5_Persistence Model_Make Forecasts

Make Forecasts/进行预测

The next step is to make persistence forecasts.

下一步是进行持续预测

We can implement the persistence forecast easily in a function named persistence() that takes the last observation and the number of forecast steps to persist. This function returns an array containing the forecast.

我们可以用一个叫persistence()的函数来容易的实现持续预测,他接受最后一个观测值和预测步数来持续(预测)。

We can then call this function for each time step in the test dataset from December in year 2 to September in year 3.

我们可以为从第二年12月到第三年9月的测试数据集中的每一个时间步调用这个函数

Below is a function make_forecasts() that does this and takes the train, test, and configuration for the dataset as arguments and returns a list of forecasts.

下面是一个函数 make_forecasts(),它来执行此操作,并且它接受train,test,和 configuration for the dataset 作为参数,并且返回一个预测列表

We can call this function as follows:

我们可以像下面这样调用这个函数:

你可能感兴趣的:(愉快的学习就从翻译开始吧_Multi-step Time Series Forecasting_5_Persistence Model_Make Forecasts)