Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Modern Time Series Forecasting with Python

You're reading from   Modern Time Series Forecasting with Python Explore industry-ready time series forecasting using modern machine learning and deep learning

Arrow left icon
Product type Paperback
Published in Nov 2022
Publisher Packt
ISBN-13 9781803246802
Length 552 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Manu Joseph Manu Joseph
Author Profile Icon Manu Joseph
Manu Joseph
Arrow right icon
View More author details
Toc

Table of Contents (26) Chapters Close

Preface 1. Part 1 – Getting Familiar with Time Series
2. Chapter 1: Introducing Time Series FREE CHAPTER 3. Chapter 2: Acquiring and Processing Time Series Data 4. Chapter 3: Analyzing and Visualizing Time Series Data 5. Chapter 4: Setting a Strong Baseline Forecast 6. Part 2 – Machine Learning for Time Series
7. Chapter 5: Time Series Forecasting as Regression 8. Chapter 6: Feature Engineering for Time Series Forecasting 9. Chapter 7: Target Transformations for Time Series Forecasting 10. Chapter 8: Forecasting Time Series with Machine Learning Models 11. Chapter 9: Ensembling and Stacking 12. Chapter 10: Global Forecasting Models 13. Part 3 – Deep Learning for Time Series
14. Chapter 11: Introduction to Deep Learning 15. Chapter 12: Building Blocks of Deep Learning for Time Series 16. Chapter 13: Common Modeling Patterns for Time Series 17. Chapter 14: Attention and Transformers for Time Series 18. Chapter 15: Strategies for Global Deep Learning Forecasting Models 19. Chapter 16: Specialized Deep Learning Architectures for Forecasting 20. Part 4 – Mechanics of Forecasting
21. Chapter 17: Multi-Step Forecasting 22. Chapter 18: Evaluating Forecasts – Forecast Metrics 23. Chapter 19: Evaluating Forecasts – Validation Strategies 24. Index 25. Other Books You May Enjoy

What this book covers

Chapter 1, Introducing Time Series, is all about introducing you to the world of time series. We lay down a definition of time series and talk about how it is related to a Data Generating Process (DGP). We will also talk about the limits of forecasting and talk about what we cannot forecast, and then we finish off the chapter by laying down some terminology that will help you understand the rest of the book.

Chapter 2, Acquiring and Processing Time Series Data, covers how you can process time series data. You will understand how different forms of time series data can be represented in a tabular form. You will learn different date-time-related functionalities in pandas and learn how to fill in missing data using techniques suited for time series. Finally, using a real-world dataset, you will go through a step-by-step journey in processing time series data using pandas.

Chapter 3, Analyzing and Visualizing Time Series Data, furthers your introduction to time series by learning how to visualize and analyze time series. You will learn different visualizations that are commonly used for time series data and then learn how to go one level deeper by decomposing time series into its components. To wrap it up, you will also look at ways to identify and treat outliers in time series data.

Chapter 4, Setting a Strong Baseline Forecast, gets right to the topic of time series forecasting as we use tried and tested methods from econometrics, such as ARIMA and exponential smoothing, to generate strong baselines. These efficient forecasting methods will provide strong baselines so that we can go beyond these classical techniques and learn modern techniques, such as machine learning. You will also get an introduction to another key topic – assessing forecastability using techniques such as spectral entropy and coefficient of variation.

Chapter 5, Time Series Forecasting as Regression, starts our journey into using machine learning for forecasting. A short introduction to machine learning lays down the foundations of what is to come in the next chapters. You will also understand, conceptually, how we can cast a time series problem as a regression problem so that we can use machine learning for it. To close off the chapter, we tease you with the possibility of global forecasting models.

Chapter 6, Feature Engineering for Time Series Forecasting, shifts gear into a more practical lesson. Using a real-world dataset, you will learn about different feature engineering techniques, such as lag features, rolling features, and Fourier terms, which help us formulate a time series problem as a regression problem.

Chapter 7, Target Transformations for Time Series Forecasting, continues the practice of exploring different target transformations to accommodate non-stationarity in time series. You will learn techniques such as the augmented Dickey–Fuller test and Mann–Kendall test to identify and treat non-stationarity.

Chapter 8, Forecasting Time Series with Machine Learning Models, continues from where the last chapter left off to start training machine learning models on the dataset we have been working on. Using the standard code framework present in the book, you will train models such as linear regression, random forest, and gradient-boosted decision trees on our dataset.

Chapter 9, Ensembling and Stacking, takes a step back and explores how we can use multiple forecasts and combine them to create a better forecast. You will explore popular techniques such as best fit, different versions of the hill-climbing algorithm, simulated annealing, and stacking to combine the different forecasts we have generated to get a better one.

Chapter 10, Global Forecasting Models, concludes your guided journey into machine learning-enabled forecasting to an exciting and new paradigm – global forecasting models. You will learn how to use global forecasting models and industry-proven techniques to improve their performance, which finally lets you develop scalable and efficient machine learning forecasting systems for thousands of time series.

Chapter 11, Introduction to Deep Learning, we switch tracks and start with a specific type of machine learning – deep learning. In this chapter, we lay the foundations of deep learning by looking at different topics such as representation learning, linear transformations, activation functions, and gradient descent.

Chapter 12, Building Blocks of Deep Learning for Time Series, continues the journey into deep learning by making it specific to time series. Keeping in mind the compositionality of deep learning systems, you will learn about different building blocks with which you can construct a deep learning architecture. The chapter starts off by establishing the encoder-decoder architecture and then talks about different blocks such as feed forward networks, recurrent neural networks, and convolutional neural networks.

Chapter 13, Common Modeling Patterns for Time Series, strengthens the encoder-decoder architecture that you saw in the previous chapter by showing you a few concrete and common patterns in which you can arrange building blocks to generate forecasts. This is a hands-on chapter where you will be creating forecasts using deep learning-based tabular regression and different sequence-to-sequence models.

Chapter 14, Attention and Transformers for Time Series, covers the contemporary topic of using attention to improve deep learning models. The chapter starts off by talking about a generalized attention model with which you will learn different types of attention schemes, such as scaled dot product and additive. You will also tweak the sequence-to-sequence models from the previous chapter to include attention and then train those models to generate a forecast. The chapter then talks about transformer models, which is a deep learning architecture that relies solely on attention, and then you will use that to generate forecasts as well.

Chapter 15, Strategies for Global Deep Learning Forecasting Models, tackles yet another important aspect of deep learning-based forecasting. Although the book talked about global forecasting models earlier, there are some differences in how it is implemented for deep learning models. In this chapter, you will learn how to implement global deep learning models and techniques on how to make those models better. You will also see them working in the hands-on section, where we will be generating forecasts using the real-world dataset we have been working with.

Chapter 16, Specialized Deep Learning Architectures for Forecasting, concludes your journey into deep learning-based time series forecasting by talking about a few popular, specialized deep learning architectures for time series forecasting. Using the concepts and building blocks you have learned through the previous chapters, this chapter takes you to the cutting edge of research and exposes the leading state-of-the-art models in time series forecasting such as N-BEATS, N-HiTS, Informer, Autoformer, and Temporal Fusion Transformer. In addition to understanding them, you will also learn how to use these models to generate forecasts using a real-world dataset.

Chapter 17, Multi-Step Forecasting, tackles the rarely talked about but highly relevant topic of multi-step forecasting. You will learn about different strategies for generating forecasts for more than one time step into the future, such as Recursive, Direct, DirRec, RecJoint, and Rectify. The book also talks about the merits and demerits of each of them and helps you choose the right strategy for your problem.

Chapter 18, Evaluating Forecasts – Forecast Metrics, traverses yet another topic that is rarely talked about and rife with controversy, with many opinions from different quarters. You will learn about different ways to measure the goodness of a forecast and through experiments, which you can run, expose the strengths and weaknesses of different metrics. The chapter concludes by laying down some guidelines that can help you choose the correct metric for your problem.

Chapter 19, Evaluating Forecasts – Validation Strategies, concludes the evaluation of forecasts and the book by talking about different validation strategies we can use for time series. You will learn different validation strategies such as hold-out, cross-validation, and their variations. The chapter also touches upon aspects to keep in mind while designing validation strategies for global settings as well. At the conclusion of the chapter, you will come across a few guidelines for choosing your validation strategies and answers to questions such as can we use cross-validation for time series?

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime