In the last chapter, we examined and implemented a long short-term memory (LSTM) network, which is a type of recurrent neural network (RNN) that processes sequences of data especially well. Its implementation was the top performing architecture for the single-step model, multi-step model, and multi-output model.
Now we’re going to explore the convolutional neural network (CNN). CNNs are mostly applied in the field of computer vision, and this architecture is behind many algorithms for image classification and image segmentation.
Of course, this architecture can also be used for time series analysis. It turns out that CNNs are noise resistant and can effectively filter out the noise in a time series with the convolution operation. This allows the network to produce a set of robust features that do not include abnormal values. In addition, CNNs are usually faster to train than LSTMs, as their operations can be parallelized.
In this chapter, we’ll first explore the CNN architecture and understand how the network filters a time series and creates a unique set of features. Then we’ll implement a CNN using Keras to produce forecasts. We’ll also combine the CNN architecture with the LSTM architecture to see if we can further improve the performance of our deep learning models.