
Time Series with PyTorch
Modern Deep Learning Toolkit for Real-World Forecasting Challenges
Packt Publishing
Published on 29. May 2026
Book
Paperback/Softback
606 pages
978-1-80512-818-2 (ISBN)
Description
Time series is far more than fit-predict forecasting. Real mastery comes from intuition and is built through experimentation. Walk the full range with two practitioners: forecasting, conformal prediction, transfer learning, and beyond.
Key Features
Grasp core concepts through clear explanations that build genuine understanding rather than surface familiarity
Work with realistic datasets and develop the judgement to choose the right approach for your problem
Progress from neural network fundamentals to advanced techniques across a full range of time series challenges.
Book DescriptionNeural networks are powerful tools for time-series forecasting, but applying them effectively requires both practical experience and a clear understanding of architectures, training strategies, and evaluation methods. This book brings these ideas together in a structured and practical way.
Starting with PyTorch fundamentals, you will build neural networks from scratch and progress through recurrent networks, attention mechanisms, and transformers before exploring forecasting architectures such as N-BEATS, N-HiTS, and the Temporal Fusion Transformer. Along the way, you will learn robust hyperparameter tuning, conformal prediction for uncertainty estimation, and reliable evaluation practices.
Unlike most forecasting books, this text also explores topics often overlooked or treated separately, including transfer learning across collections of series, synthetic data generation with diffusion models, and self-supervised representation learning. Beyond forecasting, later chapters cover classification, clustering, anomaly detection, and embeddings for large-scale time-series modeling.
Throughout, the focus is pragmatic: theory is reinforced through experimentation and implementation so you can apply these methods confidently to real-world time-series problems.What you will learn
Build, train, and evaluate neural networks for time series using PyTorch and PyTorch Lightning. Tune models with Bayesian optimisation and validate them with suitable metrics and strategies.
Progress from feedforward and recurrent networks to transformers and models such as N-BEATS, N-HiTS, and TFT.
Learn how global models use cross- and transfer learning across many series.
Generate synthetic series and representations with diffusion and self-supervised methods.
Apply modern approaches to classification, clustering, and anomaly detection.
Who this book is forThis 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 familiarity with Python is important, but we do not assume any prior knowledge of PyTorch.
The main goal of this book is to be accessible to those with little or no experience with deep learning methods in time series.
Key Features
Grasp core concepts through clear explanations that build genuine understanding rather than surface familiarity
Work with realistic datasets and develop the judgement to choose the right approach for your problem
Progress from neural network fundamentals to advanced techniques across a full range of time series challenges.
Book DescriptionNeural networks are powerful tools for time-series forecasting, but applying them effectively requires both practical experience and a clear understanding of architectures, training strategies, and evaluation methods. This book brings these ideas together in a structured and practical way.
Starting with PyTorch fundamentals, you will build neural networks from scratch and progress through recurrent networks, attention mechanisms, and transformers before exploring forecasting architectures such as N-BEATS, N-HiTS, and the Temporal Fusion Transformer. Along the way, you will learn robust hyperparameter tuning, conformal prediction for uncertainty estimation, and reliable evaluation practices.
Unlike most forecasting books, this text also explores topics often overlooked or treated separately, including transfer learning across collections of series, synthetic data generation with diffusion models, and self-supervised representation learning. Beyond forecasting, later chapters cover classification, clustering, anomaly detection, and embeddings for large-scale time-series modeling.
Throughout, the focus is pragmatic: theory is reinforced through experimentation and implementation so you can apply these methods confidently to real-world time-series problems.What you will learn
Build, train, and evaluate neural networks for time series using PyTorch and PyTorch Lightning. Tune models with Bayesian optimisation and validate them with suitable metrics and strategies.
Progress from feedforward and recurrent networks to transformers and models such as N-BEATS, N-HiTS, and TFT.
Learn how global models use cross- and transfer learning across many series.
Generate synthetic series and representations with diffusion and self-supervised methods.
Apply modern approaches to classification, clustering, and anomaly detection.
Who this book is forThis 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 familiarity with Python is important, but we do not assume any prior knowledge of PyTorch.
The main goal of this book is to be accessible to those with little or no experience with deep learning methods in time series.
More details
Language
English
Place of publication
Birmingham
United Kingdom
Dimensions
Height: 235 mm
Width: 191 mm
ISBN-13
978-1-80512-818-2 (9781805128182)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Classification
Persons
Graeme Davidson is a Lead Data Scientist at Retail Express, where he redesigned the company's demand forecasting framework in line with contemporary statistical learning practices. His background spans cognitive neuroscience, researching implicit reward processing and human decision-making, through advertising analytics to research-focused demand forecasting. He is an active contributor to several data science Slack and Discord communities, an occasional competitor in forecasting competitions, and was approached by Packt in late 2022 to write the book he wished had existed when he first fell down an ARIMA rabbit hole chasing answers about how supermarkets actually forecast demand, and how a quantitative researcher models financial markets. Lei Ma is a physicist-turned data scientist specializing in time series forecasting. He is theorist but has tackled real-world forecasting challenges across a variety of industries like housing, logistics, ecommerce, and manufacturing. Lei has led and delivered numerous forecasting projects where he combines deep expertise in building advanced time series models with a strategic approach to delivering holistic business insights. Lei creates time series forecasting tutorials online and joined the venture when Graeme approached him to collaborate on this book.
Content
Table of Contents
Time Series for Everyone
The Challenge of Time Series
Evaluating Time-Series Models
PyTorch Fundamentals
Simple Neural Architecture
Optimization
Conformal Prediction
Recurrent Neural Networks
Transformers
Other Neural Structures
Transfer Learning and Global Modelling
Synthetic Time Series Data
Diffusion Models
Time Series Classification
Time Series Clustering
Embeddings for Time Series
Supervised and Unsupervised Anomaly Detection
Self-Supervised Learning for Time Series
Time Series for Everyone
The Challenge of Time Series
Evaluating Time-Series Models
PyTorch Fundamentals
Simple Neural Architecture
Optimization
Conformal Prediction
Recurrent Neural Networks
Transformers
Other Neural Structures
Transfer Learning and Global Modelling
Synthetic Time Series Data
Diffusion Models
Time Series Classification
Time Series Clustering
Embeddings for Time Series
Supervised and Unsupervised Anomaly Detection
Self-Supervised Learning for Time Series