Training an Informer model with NeuralForecast
In this recipe, we’ll explore the neuralforecast
Python library to train an Informer model, another Transformer-based deep learning approach for forecasting.
Getting ready
Informer is a Transformer method tailored for long-term forecasting – that is, predicting with a large forecasting horizon. The main difference relative to a vanilla Transformer is that Informer provides an improved self-attention mechanism, which significantly reduces the computational requirements to run the model and generate long-sequence predictions.
In this recipe, we’ll show you how to train Informer using neuralforecast
. We’ll use the same dataset as in the previous recipes:
from gluonts.dataset.repository.datasets import get_dataset dataset = get_dataset('nn5_daily_without_missing')
How to do it…
This time, instead of creating DataModule
to handle the data preprocessing, we’ll use the typical...