Skip to content

nirmal-venkat/zero-shot-forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Moirai is a time series foundation model, offering universal forecasting capabilities. It leverages Uni2TS a PyTorch based library for research and applications related to Time Series Transformers.

Here are the functionalities of Salesforce's Moirai model that was recently released and it tackles the challenges of multi-series zero shot forecasting with four key innovations:

  1. One model/architecture for any frequency: Traditional models needs training on the specific dataset and would work only on the dataset's frequency (e.g., daily vs. hourly sales). Moirai employs a clever technique called patch size projection layers. These layers allow the model to analyze data at different granularities within the same architecture, ensuring it can handle the diverse frequencies present in real-world forecasting problems.
  2. Accept any number of exogenous variables: Any-variate Attention Mechanism enables the model to accept an arbitrary number of variates as input, whether it's historical sales data, weather patterns, or upcoming holidays.
  3. Provides probabilistic predictions through Mixture Distribution: Predicting a single point estimate for future demand can be limiting. Moirai addresses this by employing a mixture distribution. This allows the model to capture the inherent uncertainty in forecasting by generating a range of probable future values.
  4. LOTSA (Large-scale Open Time Series Archive) – Moirai's massive and diverse dataset. This rich training ground exposes the model to a wide range of time series patterns, frequencies, and variabilities, allowing it to generalize hopefully to new, unseen data.

This repo has Sample Code Implementation of Salesforce's Moirai model. We used the Sales data of a Greek dairy production company for this demonstration. The dataset has daily sales data of 7 products over a span of 3 years. Moirai can be trained in 3 sizes – small/base/large with 14m/91m/311m parameters! Moirai tackles the diverse frequencies challenge with multiple patch size projection layers, allowing a single model to capture temporal patterns across various frequencies. The dataset used in this repo can be accessed from here: https://ieee-dataport.org/documents/dairy-supply-chain-sales-dataset