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

Implementing TimeVAE

This section provides a practical implementation of the TimeVAE model using PyTorch. To streamline readability, we’ve made some simplifications in our code. For a more detailed implementation, please refer to the official repository https://github.com/abudesai/timeVAE or the repository https://github.com/wangyz1999/timeVAE-pytorch.

  1. As is usual, we start with preparing the time series dataset. As the TimeVAE model is quite complex, we will use a simple synthetic dataset to demonstrate the model. The synthetic dataset is generated using the following code:
    import math
    import pandas as pd
    import numpy as np
    def generate_sine_wave(
        num_periods: int,
        num_samples_per_period: int,
        amplitude: float = 1.,
        period: float = 20,
    ) -> pd.DataFrame:
        """generate a sine wave time series
        :param num_periods: number of periods
        :param num_samples_per_period: number of
            samples per period
        :param amplitude...
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