In this lecture I want to discuss some other ways you might generate multi-step forecasts.
You may have noticed that the two forecasting methods we used in this section demonstrated some pretty
extreme results.
On one hand we saw that once that forecast can seem artificially good especially when all they do is
just predict the last value or close to it.
On the other hand doing a multi-step forecast iteratively using the models own predictions can lead
to poor results even on simple problems like the sine wave.
Even a nearly perfect sine wave model eventually breaks down due to the build up of numerical position
errors
at this point.
One issue we have to think about is practicality.
In fact it's not necessarily wrong to predict only one step ahead.
It's certainly wrong when you want to make a conclusion such as Wow look how good my model is at predicting
future values.
Of course that doesn't make any sense because you used future values to predict the future values.
In some cases it may make sense to only want a prediction for one time step ahead.
In other cases it may not make sense.
For example if you want to forecast weekly or monthly sales for the next year it doesn't make sense
to only do a one step forecast.
On the other hand maybe you just want to predict the load on your website for tomorrow.
So you know how many Amazon machine instances to spin up.
Either way the method you use is highly dependent on context and the real world constraints of your
problem.
It's also important to benchmark your predictions against a baseline model.
The reason you want to do this is well what if your complicated model performs worse than your baseline
model.
If that happens then you should just use your baseline model as you'll see.
Sometimes you can even prove mathematically that your baseline model is better than your complex model.
One way to establish a baseline is to use what is called a naive forecast a naive forecast does the
dumbest thing possible.
You guessed it it just predicts the last value of the time series.
It's a model with zero parameters.
One interesting fact you will learn about if you ever study finance is that stock prices very closely
follow A Random Walk Model in a random walk model.
A naive forecast is in fact the best forecasts you can make.
So by definition if your time series follows a random walk it doesn't matter how complex your model
is.
You cannot beat a naive forecast
in time series literature classic statistical models such as Auriemma use algorithms that predicts only
one step ahead and then use the iterative method we discussed previously in order to do multi-step forecasts
into the future.
One interesting question to ask is Are there any models that naturally predict multiple steps into the
future.
The answer is yes and we can do so quite trivially.
As you know it's very easy to specify the number of outputs in your neural network model.
You're just passing a number into the dense layer for the number of outputs you want.
So what if you want a model that predicts 12 time steps ahead simultaneously.
In fact that's entirely possible.
Just make a neural network with twelve outputs.
Then as the target you'll use the true values for the next twelve timestamps.
So whereas in this course the target just had one value for a multi head model.
You'll have a target with 12 values.
If you're interested in this kind of thing you might want to give this a try as an exercise
to summarize this lecture what we wanted to do was clarify the difference between the different kinds
of forecasts.
The big mistake a lot of people make is they pretend they are predicting the future when in actuality
they are only predicting one step ahead.
It's not wrong to predict only one step ahead but you must be clear about the results you are presenting.
If you really want to forecast multiple steps into the future then you are not allowed to use data from
the future.
Of course there are some cases where you actually want to make one step forecasts only.
This is dependent on the specifics of your company and your data only you know that and you must design
your model accordingly.
We also discussed the importance of establishing a baseline which in time series analysis is often the
naive forecast where all we do is predict the previous value of the series I mentioned that ran a Walk
Model which often very closely models stock prices a naive forecast is in the best forecast.
In addition we saw that aside from building a one step model and then iteratively applying it to predict
multiple steps into the future there is an easy modification we can simply use a neuron that with multiple
output nodes representing the multiple steps in the future that we want to predict.