Time series forecasting is an approach to predict future data values by analyzing the patterns and trends in past observations over time. Organizations across industries require time series forecasting for a variety of use cases, including seasonal sales prediction, demand forecasting, stock price forecasting, weather forecasting, financial planning, and inventory planning.
Various cutting edge algorithms are available for time series forecasting, such as DeepAR, the seq2seq family, and LSTNet (Long- and Short-term Time-series network). The machine learning (ML) process for time series forecasting is often time-consuming, resource intensive, and requires comparative analysis across multiple parameter combinations and datasets to reach the required precision and accuracy with your models. To determine the best model, developers and data scientists need to:
- Select algorithms and hyperparameters.
- Build, configure, train, and tune models.
- Evaluate these models and compare metrics captured at training and evaluation time.
- Visualize results.
- Repeat the preceding steps multiple times before choosing the optimal model.
The infrastructure management associated with the scaling required at training time for such an iterative process may lead to undifferentiated heavy lifting for the developers and data scientists involved.
In this post and the associated notebook, we show you how to address these challenges by providing an approach with detailed steps to set up and run time series forecasting models at scale using Gluon Time Series (GluonTS) on Amazon SageMaker. GluonTS is a Python toolkit for probabilistic time series modeling, built around Apache MXNet. GluonTS provides utilities for loading and iterating over time series datasets, state-of-the-art models ready to be trained, and building blocks to define your own models and quickly experiment with different solutions.
We first show you how to set up GluonTS on SageMaker using the MXNet estimator, then train multiple models using SageMaker Experiments, use SageMaker Debugger to mitigate suboptimal training, evaluate model performance, and finally generate time series forecasts. We walk you through the following steps:
- Prepare the time series dataset.
- Create the algorithm and hyperparameters combinatorial matrix.
- Set up the GluonTS training script.
- Set up a SageMaker experiment and trials.
- Create the MXNet estimator.
- Set up an experiment with Debugger enabled to automatically stop suboptimal jobs.
- Train and validate models.
- Evaluate metrics and select a winning candidate.
- Run time series forecasts.
Before getting started, you must set up your SageMaker notebook instance and install the required packages. Complete the following steps:
Source - Continue Reading: https://aws.amazon.com/blogs/machine-learning/training-debugging-and-running-time-series-forecasting-models-with-the-gluonts-toolkit-on-amazon-sagemaker/