So in this video, we will be looking at how to implement Arnon's with airline passengers, our benchmark
data set as we've done before, we will look at various kinds of predictions, including one step incremental
multi step and multi output forecasts.
This video will also go through different configurations of Arnon's, including global max pooling,
stacking multiple layers and so forth.
This lecture will focus on the LSM, but as stated earlier, there is no more work to do if you want
to try the Jiru.
And as always, there is yet again a combinatorial explosion of options to choose from.
In other words, it would get very tedious if you wanted to exhaustively try everything.
So if there's anything you want to try in particular, please do so on your own.
OK.
So notice how we only need two new imports, which are the LSM and the Jiru.
OK, so as before, we will be using the difference in log passengers now, as I always mention, sometimes
students believe that Arnon's should just work without having to difference.
So if you are one of those students, please test it out on your own and compare the results.
Notice that for Arnon's, we want our data to have the shape end by.
Just like for CNN's.
The next step is to split our data into train and test.
The next step is to build our brand.
So we start by defining an input of shaped by one since our Time series only has one dimension.
The next step is to create an LSM.
Now, again, a somewhat common mistake is confusing the size of the head and vector, which is twenty
four with the length of the time series, which is big T..
So make sure you understand that these are not the same thing.
And again, just a quick reminder that hyper parameters like this value of twenty four must be chosen
by trial and error.
There is no formula you can use to compute the ideal value.
Also note that for times the typical activation function is the Tanach, which is chosen by default.
If you decide to use other activations, Tensor Flow will not efficiently use the GPU and encourage
you to check the documentation if you want to learn more.
So whenever we use the SDM, we will be using the default options, the next step is to have our final
dence player recall that by default, the LSM outputs only the final hit and vector.
And so our output is just the size one scalar.
Thus we are building a one step predictor as usual.
The next step is to look at the model summary.
OK, so hopefully you're not surprised that what you see, our model is basically just two layers,
one LSM and one final dance as promised by default, the Elysium output's just a single vector of size
24 since that's what we chose.
Note that this is not the same as the sequence length, which is 10.
OK, so the next step is to call compound fit like we normally do.
The next step is to apply the laws prepack.
So the last prepack looks OK.
The next step is to use our trains model predictions, undo the differences and then plot the results.
Since you've seen all this code before, I won't explain it again.
OK, so this is the one step forecast.
It appears that our model works well.
The next step is to compute the multi-step forecast, since you've seen all this code before, I won't
explain it again.
OK, so this is the incremental multistep forecast, again, it appears that our model works quite well.
Of course, the best thing to do would be to check its performance against the other methods we've studied.
The next step is to create a multi output supervised data set since you've seen this code before.
I won't explain it again.
The next step is to create our own.
So this time, notice that our Elysium has returned sequences equal to true.
In this case, it's going to return a sequence of hidden states.
Since we need to turn the result into a vector, we then apply global max pooling.
As you recall, this works the same for both CNN's and Arnon's.
The next step is to create a dense layer with T outputs.
So at this point, recognize that there are some things we could have tried but did not.
For example, we could have tried a global max pooling for the ones that predictor.
We could have also tried at the multiple predictor without return sequences equal to true.
So if you're curious about how those would perform, please give them a try.
The next step is to create a model checkpoint to save our best model.
The next step is to compile and fit, as we normally do.
The next step is to plot a lawsuit prepack.
OK, so the last park seems to look OK.
The next step is to load up our best model and compute the predictions since you've seen this code before,
I won't explain it again.
OK, so these are the multi output predictions, our model appears to do a bit better than before.
The next step is to test Iran with multiple LSM layers, in this case, I've decided to use to Airstreams
both with 16 hidden units.
Notice that in both cases I've set return sequences equal to true.
So both electives return a sequence of hidden vectors, which is also equivalent to a multivariate time
series, as before we apply global max pooling to convert the sequence into a single vector and apply
one final dense layer.
Now, again, there's no particular reason I've chosen 16 hidden units.
Please try any values you like and see how it performs.
The next step is to create a checkpoint as before.
The next step is to compound fit as before.
The next step is to plot the Lansberry Park.
So the last prepack looks fine, you may want to try training for more epochs to see if it improves.
The next step is to load in our best model and compute the multi output forecast as before.
OK, so this is our second multi output forecast from Iran with multiple layers, again, it appears
to perform better than the previous incremental multi-step prediction.
The next step is to compute the map for all the multistep forecasts.
OK, so it looks like the map was the best for the multi output Arnaud's in this case the Ansan with
only one LSM performs better.
As always, please test your own hyper parameters and see whether or not you can improve the results.