Book description
Perform time series analysis and forecasting confidently with this Python code bank and reference manual
Key Features
- Explore forecasting and anomaly detection techniques using statistical, machine learning, and deep learning algorithms
- Learn different techniques for evaluating, diagnosing, and optimizing your models
- Work with a variety of complex data with trends, multiple seasonal patterns, and irregularities
Book Description
Time series data is everywhere, available at a high frequency and volume. It is complex and can contain noise, irregularities, and multiple patterns, making it crucial to be well-versed with the techniques covered in this book for data preparation, analysis, and forecasting.
This book covers practical techniques for working with time series data, starting with ingesting time series data from various sources and formats, whether in private cloud storage, relational databases, non-relational databases, or specialized time series databases such as InfluxDB. Next, you'll learn strategies for handling missing data, dealing with time zones and custom business days, and detecting anomalies using intuitive statistical methods, followed by more advanced unsupervised ML models. The book will also explore forecasting using classical statistical models such as Holt-Winters, SARIMA, and VAR. The recipes will present practical techniques for handling non-stationary data, using power transforms, ACF and PACF plots, and decomposing time series data with multiple seasonal patterns. Later, you'll work with ML and DL models using TensorFlow and PyTorch.
Finally, you'll learn how to evaluate, compare, optimize models, and more using the recipes covered in the book.
What you will learn
- Understand what makes time series data different from other data
- Apply various imputation and interpolation strategies for missing data
- Implement different models for univariate and multivariate time series
- Use different deep learning libraries such as TensorFlow, Keras, and PyTorch
- Plot interactive time series visualizations using hvPlot
- Explore state-space models and the unobserved components model (UCM)
- Detect anomalies using statistical and machine learning methods
- Forecast complex time series with multiple seasonal patterns
Who this book is for
This book is for data analysts, business analysts, data scientists, data engineers, or Python developers who want practical Python recipes for time series analysis and forecasting techniques. Fundamental knowledge of Python programming is required. Although having a basic math and statistics background will be beneficial, it is not necessary. Prior experience working with time series data to solve business problems will also help you to better utilize and apply the different recipes in this book.
Table of contents
- Time Series Analysis with Python Cookbook
- Contributors
- About the author
- About the reviewers
- Preface
- Chapter 1: Getting Started with Time Series Analysis
- Chapter 2: Reading Time Series Data from Files
- Chapter 3: Reading Time Series Data from Databases
- Chapter 4: Persisting Time Series Data to Files
- Chapter 5: Persisting Time Series Data to Databases
- Chapter 6: Working with Date and Time in Python
-
Chapter 7: Handling Missing Data
- Technical requirements
- Understanding missing data
- Performing data quality checks
- Handling missing data with univariate imputation using pandas
- Handling missing data with univariate imputation using scikit-learn
- Handling missing data with multivariate imputation
- Handling missing data with interpolation
- Chapter 8: Outlier Detection Using Statistical Methods
- Chapter 9: Exploratory Data Analysis and Diagnosis
- Chapter 10: Building Univariate Time Series Models Using Statistical Methods
- Chapter 11: Additional Statistical Modeling Techniques for Time Series
-
Chapter 12: Forecasting Using Supervised Machine Learning
- Technical requirements
- Understanding supervised machine learning
- Preparing time series data for supervised learning
- One-step forecasting using linear regression models with scikit-learn
- Multi-step forecasting using linear regression models with scikit-learn
- Forecasting using non-linear models with sktime
- Optimizing a forecasting model with hyperparameter tuning
- Forecasting with exogenous variables and ensemble learning
- Chapter 13: Deep Learning for Time Series Forecasting
- Chapter 14: Outlier Detection Using Unsupervised Machine Learning
-
Chapter 15: Advanced Techniques for Complex Time Series
- Technical requirements
- Understanding state-space models
- Decomposing time series with multiple seasonal patterns using MSTL
- Forecasting with multiple seasonal patterns using the Unobserved Components Model (UCM)
- Forecasting time series with multiple seasonal patterns using Prophet
- Forecasting time series with multiple seasonal patterns using NeuralProphet
- Index
- Other Books You May Enjoy
Product information
- Title: Time Series Analysis with Python Cookbook
- Author(s):
- Release date: June 2022
- Publisher(s): Packt Publishing
- ISBN: 9781801075541
You might also like
video
Getting Started with Time Series Forecasting in Python
Marco Peixeiro explores the random walk model, MA(q), and AR(p) models, and teaches you how to …
book
Machine Learning for Time Series Forecasting with Python
Learn how to apply the principles of machine learning to time series modeling with this indispensable …
book
Time Series Forecasting in Python
Build predictive models from time-based patterns in your data. Master statistical models including new deep learning …
book
Machine Learning with Python Cookbook, 2nd Edition
This practical guide provides more than 200 self-contained recipes to help you solve machine learning challenges …