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
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Time Series with PyTorch
Time Series with PyTorch

Time Series with PyTorch: Modern Deep Learning Toolkit for Real-World Forecasting Challenges

Arrow left icon
Profile Icon Graeme Davidson Profile Icon Lei Ma
Arrow right icon
Early Access Early Access Publishing in Sep 2025
$27.99 $31.99
eBook Sep 2025 1st Edition
eBook
$27.99 $31.99
Paperback
$39.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Graeme Davidson Profile Icon Lei Ma
Arrow right icon
Early Access Early Access Publishing in Sep 2025
$27.99 $31.99
eBook Sep 2025 1st Edition
eBook
$27.99 $31.99
Paperback
$39.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$27.99 $31.99
Paperback
$39.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Time Series with PyTorch

Join our book community on Discord

https://packt.link/EarlyAccessCommunity

“It’s difficult to make predictions, especially about the future” - chances are you have heard this line before (attributed to Niels Bohr or Yogi Berra, depending on whom you trust). Predicting the future has been a human activity for a very long time: - attempting to foretell the future based on the distribution of sacrificial animal entrails happened in numerous cultures around the world - in the Bible, the Book of Daniel discusses “magicians, enchanters, astrologers and diviners'' employed at the court - Oracle of Delphi provided her predictions while intoxicated by vapors.

While the fortunes of forecasters varied throughout history (emperor Constantine banned “soothsayers, mathematicians and forecasters”), in our day and age it is a crucial activity. As for the “difficult” part, here are some of the most famous examples of people really missing...

A brief background

Humans have always had to contend with uncertainty in the world: in our earliest days, survival depended on rough predictions based on our experience to plan ahead, be it stocking wood for the winter, or storing enough food for dry seasons. Just a small attempt at predicting the weather for the next few weeks can tell you this is not a trivial task.

Before we can attempt to forecast a probable future we must first capture measurements of the past, which is essentially what a time-series is: logged data over time. The earliest attempts at recording data over time come from the Domesday Book (1086 AD), and the Chinese imperial archives, which were used to capture information on assets and crop yields, in order to tax members of a population.

Since these early examples, there has been an explosion of time-series usages, particularly in the last few years as data logging and storage has become cheaper, easier, and more accurate (sometimes). Time series are everywhere in...

The early period

Time series analysis is a statistical method that has been used for centuries to identify patterns in data that change over time. The earliest known use of time series analysis dates back to the 17th century when Sir Isaac Newton used it to predict the movement of planets. However, time series analysis did not start developing as a field for another two centuries. In the early 19th century, Carl Friedrich Gauss developed the concept of least squares regression, which is a statistical technique used to model relationships between variables. This technique was later applied to time series data, leading to the development of early time series models. In the mid-1800s, mathematicians such as Adolphe Quetelet and Francis Galton developed statistical techniques to analyze time series data.

George Airy, the seventh Astronomer Royal, used a statistical approach known as the harmonic method to predict tidal patterns - a rather important topic for a naval power like Britain. The...

The classical era

Important as the lineage discussed in the previous section was, the classical era of time series started with George Yule who introduced the world to autoregression. The Yule-Walker equation demonstrated that autoregression could forecast sunspots, ushering in a new era of time-series forecasting. The next major step was the Box-Jenkins method (named, unsurprisingly, after its authors): it provided a framework for modeling and forecasting time series data based on a combination of autoregressive and moving average components. The Box-Jenkins method became widely used in industry and academia and remains an important tool in time series modeling today; below we list major variants of the approach that are very much used to this day:

  • ARIMA Models:
    • Autoregressive integrated moving average (ARIMA): Method that combines autoregression, differencing, and moving averages to model the underlying structure and trends of a time series.
    • Seasonal ARIMA (SARIMA): Extends ARIMA...

The promise of deep learning

In recent years, deep learning techniques have revolutionized the field of time series analysis. The original idea came from the field of natural language processing (NLP), where neural networks like RNN (and later LSTM) have gone supernova from 2015 onward: the ability to model long sequences proved to be a game-changer. Let’s take a closer look at this evolution.

From language to time

The developments in NLP have made progress for time series possible by providing the inspiration for new deep learning techniques. In particular, the success of RNNs in modeling sequences of words in natural language processing tasks led to the development of similar techniques for modeling time series data. RNNs are a powerful tool for modeling sequential data because they can capture long-term dependencies between observations. This makes them particularly useful for modeling time series data, which often exhibits complex temporal patterns that are difficult to capture...

Summary

This concludes our crash-intro-to-time-series-history chapter - quite possibly the one part of this book with no formulas, graphs or tables.

Let's briefly recap our journey; we began by exploring the early origins of time series analysis, from ancient attempts at predicting crop yields to the first recorded instances of data logging in the Domesday Book and Chinese imperial archives. We then moved to the classical era, examining the development of fundamental techniques that still form the backbone of many forecasting today.

We’ve traced the evolution from simple descriptive statistics to more sophisticated modeling techniques like ARIMA and its variants. We discussed the emergence of state space models and the Kalman filter, showcasing the field's adaptability to difficult to model data. We moved on to talk about the development of GARCH models to address volatility clustering in financial time series. Finally, we introduced machine learning and deep learning...

Left arrow icon Right arrow icon

Key benefits

  • Get to grips with concepts through jargon-busting explanations
  • Learn to use a variety of datasets that reflect problems you’re likely to encounter in everyday practice
  • Understand how to select the appropriate algorithms to avoid unnecessary complexity
  • Learn from progressive and pedagogical chapters that guides you from introductory toy problems to end-to-end real-world projects

Description

Deep learning (DL) is a cutting-edge approach to learning from data. While it has taken the areas of computer vision and natural language processing by storm, its application to time-series forecasting is a more recent phenomenon and remains challenging for both new and experienced practitioners. To develop the best time series models for a real-world problem, it is essential to have not only a thorough understanding of the time series data but also a solid grasp of DL models themselves. This book investigates time series structures and the DL approaches that can address the variety of challenges they present to practitioners in industry. In this book, you will gain insights from a variety of perspectives, both from the data and the models. You will learn about the complexities of real-world time series data, explore the different problem settings for time series analysis, touch upon the foundation of DL models for time series, and practice end-to-end time series analysis projects when DL works; the authors believe in choosing the best tool for the problem, so traditional methods are never far from our minds. A GitHub repository with coding examples will be provided to support your journey. By the end of this book, you will be able to approach almost any time series challenge with an appropriate model that gets you results.

Who is this book for?

This book is for data analysts, scientists, and students who want to know how to apply deep learning methods to time-series forecasting problems with PyTorch for real-world business problems. While the book assumes some understanding of statistics and modeling, you won’t need in-depth knowledge of time-series to follow along. Some awareness of Python programming is important, but we do not assume any prior knowledge of PyTorch. The main goal of this book is to be accessible for those with little or no experience with deep learning methods in time series.

What you will learn

  • Develop an understanding of how to code and test neural networks with PyTorch and PyTorch Lightning
  • Address challenges presented by different data structures with neural architecture
  • Learn advanced methods to evaluate and validate models by comparing and optimizing them and partitioning your data correctly
  • Gain insight into how time series models work behind the scenes and why a model fits a particular type of problem
  • Apply contemporary approaches like TFT, NBEATs, and NHiTS for individual forecasts and hierarchical modeling

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Last updated date : Sep 17, 2025
Publication date : May 15, 2026
Edition : 1st
Language : English
ISBN-13 : 9781805120421
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Last updated date : Sep 17, 2025
Publication date : May 15, 2026
Edition : 1st
Language : English
ISBN-13 : 9781805120421
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Table of Contents

9 Chapters
Time Series with PyTorch, First Edition: Modern Deep Learning Toolkit for Real-World Forecasting Challenges Chevron down icon Chevron up icon
Time series for everyone Chevron down icon Chevron up icon
The Challenge of Time series Chevron down icon Chevron up icon
Evaluating time-series models Chevron down icon Chevron up icon
PyTorch Fundamentals Chevron down icon Chevron up icon
Simple neural architectures Chevron down icon Chevron up icon
Optimisation Chevron down icon Chevron up icon
Conformal prediction Chevron down icon Chevron up icon
Recurrent Neural Networks Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.

Modal Close icon
Modal Close icon