Book Image

Deep Learning for Time Series Cookbook

By : Vitor Cerqueira, Luís Roque
Book Image

Deep Learning for Time Series Cookbook

By: Vitor Cerqueira, Luís Roque

Overview of this book

Most organizations exhibit a time-dependent structure in their processes, including fields such as finance. By leveraging time series analysis and forecasting, these organizations can make informed decisions and optimize their performance. Accurate forecasts help reduce uncertainty and enable better planning of operations. Unlike traditional approaches to forecasting, deep learning can process large amounts of data and help derive complex patterns. Despite its increasing relevance, getting the most out of deep learning requires significant technical expertise. This book guides you through applying deep learning to time series data with the help of easy-to-follow code recipes. You’ll cover time series problems, such as forecasting, anomaly detection, and classification. This deep learning book will also show you how to solve these problems using different deep neural network architectures, including convolutional neural networks (CNNs) or transformers. As you progress, you’ll use PyTorch, a popular deep learning framework based on Python to build production-ready prediction solutions. By the end of this book, you'll have learned how to solve different time series tasks with deep learning using the PyTorch ecosystem.
Table of Contents (12 chapters)

Technical requirements

We’ll focus on the PyTorch Lightning ecosystem to build deep learning models. Besides that, we’ll also use scikit-learn to create a baseline. Overall, the list of libraries used in the package is the following:

  • scikit-learn (1.3.2)
  • pandas (2.1.3)
  • NumPy (1.26.2)
  • Torch (2.1.1)
  • PyTorch Lightning (2.1.2)
  • sktime (0.24.1)
  • keras-self-attention (0.51.0)

As an example, we’ll use the Car dataset from the repository available at the following link: https://www.timeseriesclassification.com. You can learn more about the dataset in the following work:

Thakoor, Ninad, and Jean Gao. Shape classifier based on generalized probabilistic descent method with hidden Markov descriptor. Tenth IEEE International Conference on Computer Vision (ICCV’05) Volume 1. Vol. 1. IEEE, 2005.

The code and datasets used in this chapter can be found at the following GitHub URL: https://github.com/PacktPublishing/Deep-Learning...