Out of interest, let's do a prediction.
The window size I'm using is 30 steps, and the dataset is 3,235 steps long.
So if I want to predict the next value after the end of my dataset,
I would use this code.
And I would get the result 7.0773993.
The dataset goes up to July 2018, so
I'm actually predicting 7.077 sunspots for August 2018.
And if I look at this chart of observations,
which does have some slightly different data from my dataset,
I can see that the actual recorded number of sunspots in August 2018 was 8.7.
So the prediction isn't too bad, but let's see if we can improve on it.
With these settings, I got the MAE down to 13.75, and
the prediction was 8.13, which is much closer to the actual real reading of 8.7.
There is a random elements in creating models, however, so your results may vary.
Doing accuracy based on a single prediction like this is also a recipe for
disappointment, and
you're much better off evaluating mean accuracy over a number of readings.
So here, we looked at using a DNN to predict sunspot values.
With a little bit of tuning, we reduced our MAE a bit.
And when we tried to predict the next month's value using this model,
we got quite close to the actual value.
In the next video, you'll go through this workbook to see it in action.
And then you should try it out for yourself,
to see if you can improve on what I got.
After that, you'll look into the RNNs again and
see if you can get better predictions using those.