# [MLS-C01] [Algorithms] Forecasting Algorithms

Posted by Oscaner on August 7, 2022

## Defined

• Supervised learning algorithm that forecasts one-dimensional (scalar) time series using recurrent neural networks (RNN)
• Trains a single model jointly over all of the similar time series in your dataset
• Use your trained model to create forecasts for new time series that are similar to the ones on which it was trained
• Training input is one or more target time series that have been generated by the same process or similar processes
• Uses an approximation of the process(es) and predicts how the target time series evolves

## Use Cases

1. Forecasting global food demand
2. Predicting global temperature
3. Predicting fast-food queues
4. Predicting rainfall
5. Predicting stock prices
6. Options pricing
7. Disease progression
8. Supply chain management

## SageMaker Algorithms

### DeepAR

• Uses a training dataset and an optional test dataset
• Use a trained model to predict forecasts for the future of the time series in the training set, or for other time series
• Automatically derives time series based on the frequency of the target series
• For example: a day series generates day-of-week, day-of-month, day-of-year
• Can predict “what if ?” scenarios, such as, what if I change/broaden the distribution of my product ?
• Builds a single model for all time-series and tries to identify similarities across them
• Important Hyperparameters
• context_length: the number of time-points that the mode gets to see before making the prediction
• epochs: the maximum number of passes over the training data
• prediction_length: the number of time-steps that the model is trained to predict, also called the forecast horizon
• time_freq: the granularity of the time series in the dataset