Skip to main content

 

COMING SOON

 

With Pigment’s Predictions tool, you can improve your forecast accuracy by including external factors, such as weather reports, planned changes to pricing and distribution, and other data. This article provides best practices and tips on adding external factors to your model.

 

Before you begin

 

Adding external factors to your Predictions might improve forecast accuracy. External data sets that capture cause-effect relationships can predict behaviors historical data alone might miss. Examples include:

  • price shifts
  • distribution changes
  • promotions and advertising campaigns
  • holiday seasons
  • weather

 

Eligible Metrics for external factors

 

Data to be used as external factors must be held in Metrics, with a maximum of 10 Metrics for each prediction. To be eligible, the data must be:

  • 90% complete, as defined below
  • With the same Dimensions as the source Metric
  • Integer or Number data type

 

ℹ️ Note

Having too many external factors, especially those that are not clearly related to the forecasted Metric, can introduce noise, reduce accuracy, and increase computation time. For best results, only select external factors that have a clear, plausible influence on the Metric you are forecasting.

 

Run a Prediction with external factors

 

When you have chosen and set up an eligible Metric as above, you start a new Prediction by selecting the checkbox beside the Metric’s name in the Configure Prediction dialog. The external factors are evaluated automatically (see next section) and the data is included if relevant.

 

Automatic evaluation

 

When you include external factors in a prediction, Pigment performs two evaluation steps before including them. If your external factors are not changing your Predictions, they may not have passed the following evaluations:
 

1. Pre-processing of external factors

First, Pigment checks for completeness per time series:

  • External factor data must cover 90% minimum of the time series, both backwards in time and forwards.

    Imagine you are predicting 12 months of future data for a Metric using 48 months of past data. Your external factors must have, at a minimum:
    • 90% x 12 = 10.8. → 11 months of future data.
    • 90% x 48 = 43.2. → 44 months of past data.
    • if those thresholds are not met for a given time series, the external factor data is not used in the prediction for that time series.
       
  • If the completeness condition is met, missing values are handled automatically:
    • Backward fill is used at the beginning of the series: the first known value is used to fill any missing values that come before it.
    • Interpolation is applied for missing values in the middle: missing values between known data points are estimated based on a straight line method between the surrounding values.
    • Forward fill is used at the end of the series: the last known value is carried forward to fill any missing values that follow it.

This approach ensures Predictions are only influenced by external data that’s complete enough and meaningful, while remaining robust to a few missing values.

 

2. Granger causality test

Pigment performs a Granger causality test (see Wikipedia for more information) to assess whether an external factor has predictive power for the Metric.

For each external factor and time series:

  • Up to five time lags are tested. A lag is a past value of an external factor, used to check if earlier changes in that factor help explain or predict future changes in the Metric.
  • A factor is selected if any lag produces a p-value below 0.005, indicating statistically significant predictive power.

This step filters out irrelevant external factors and ensures only meaningful data is used in the model.

 

Learn more

Be the first to reply!

Reply