Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
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 Industry-ready machine learning and deep learning time series analysis with PyTorch and pandas

Arrow left icon
Product type Paperback
Published in Oct 2024
Publisher Packt
ISBN-13 9781835883181
Length 658 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Jeffrey Tackes Jeffrey Tackes
Author Profile Icon Jeffrey Tackes
Jeffrey Tackes
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 FREE CHAPTER
2. Introducing Time Series 3. Acquiring and Processing Time Series Data 4. Analyzing and Visualizing Time Series Data 5. Setting a Strong Baseline Forecast 6. Part-2: Machine Learning for Time Series
7. Time Series Forecasting as Regression 8. Feature Engineering for Time Series Forecasting 9. Target Transformations for Time Series Forecasting 10. Forecasting Time Series with Machine Learning Models 11. Ensembling and Stacking 12. Global Forecasting Models 13. Part-3: Deep Learning for Time Series
14. Introduction to Deep Learning 15. Building Blocks of Deep Learning for Time Series 16. Common Modeling Patterns for Time Series 17. Attention and Transformers for Time Series 18. Strategies for Global Deep Learning Forecasting Models 19. Specialized Deep Learning Architectures for Forecasting 20. Probabilistic Forecasting and More 21. Part-4: Mechanics of Forecasting
22. Multi-Step Forecasting 23. Evaluating Forecast Errors—A Survey of Forecast Metrics 24. Evaluating Forecasts—Validation Strategies 25. Index

Handling longer periods of missing data

We saw some techniques for handling missing data earlier – forward and backward filling, interpolation, and so on. Those techniques usually work if there are one or two missing data points. But if a large section of data is missing, then these simple techniques fall short.

NOTEBOOK ALERT

To follow along with the complete code for missing data imputation, use the 03 - Handling Missing Data (Long Gaps).ipynb notebook in the chapter02 folder.

Let's read blocks 0-7 parquet from memory:

block_df = pd.read_parquet("data/london_smart_meters/preprocessed/london_smart_meters_merged_block_0-7.parquet")

The data that we have saved is in compact form. We need to convert it into expanded form because it is easier to work with time series data in that form. Since we only need a subset of the time series (for faster demonstration purposes), we are just extracting one block from these seven blocks. To convert compact form into expanded...

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 $19.99/month. Cancel anytime
Banner background image