Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Time Series with PyTorch
  • Table Of Contents Toc
Time Series with PyTorch

Time Series with PyTorch

By : Graeme Davidson, Lei Ma
close
close
Time Series with PyTorch

Time Series with PyTorch

By: Graeme Davidson, Lei Ma

Overview of this book

Neural 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.
Table of Contents (22 chapters)
close
close
20
Other Books You May Enjoy
21
Index

Missing data

Typically, you will deal with regular time series like this, where we have data collected at regular intervals. By contrast, irregular time series are built with data that, while recorded sequentially, varies in the intervals of collection. For example, natural disasters are infrequent and can vary from days apart to years. Regular data can degrade into irregular data if we have a lot of missing data. This is not unusual in retail settings, where we often see low-frequency items/products, such as the sales of Bugatti in the UK (169 in 2019). Let’s look at a practical example to illustrate this:

df = pd.read_csv(Path.cwd().parent / "data" / "bugatti_sales.csv")
print(df.head(n=5))

The output for this code is as follows:

   year month  sales
0  2016   Mar      1
1  2016   Apr      2
2  2016   Sep      2
3  2016   Nov      1
4  2016   Dec      1

We can see from the table that several months are missing (no data) between particular...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Time Series with PyTorch
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon