Skip to content

Chaining models

As mentioned in the overview section, TIM accepts a Model Zoo as one of the forecasting inputs and is able to modify it to better suit the current forecasting situation. In this section, multiple ways to use this functionality to handle a real production deployment are discussed.

The easiest "rebuild nothing" way

The easiest way to make sure your production pipeline works well is to always provide an empty Model Zoo as an input. This will cause TIM to build every model needed from scratch, using all available data. TIM will make sure that every single model has the highest possible accuracy. Alternatively, one can achieve this by configuring the rebuilding policy setting to "All". This will cause the rebuilding process to ignore all input models and proceed in the same way.

all

There are two disadvantages to this way of workinkg:

  1. The model building time: Interpreting already existing models is much faster than building new models.
  2. Data traffic: To evaluate already existing models, usually the entire dataset doesn't have to be sent to TIM; only the most recent part of the data should suffice.

The most convenient "rebuild new situations" way

The most convenient way to to ensure a working production pipeline can be achieved by configuring the rebuilding policy setting to "new situations". The main advantage of this way of working is overcoming the first disadvantage of the previous option. When a user selects this option, TIM will gradually enrich the existing Model Zoo with new models, if there is a need to build them. This need may arise from a changed prediction horizon, different predictor availabilities or a different time of day corresponding to the last target timestamp (in case of daily cycle data). Read more about this topic in the section about different situations.

new situations

This approach also has two disadvantages:

  1. Data traffic: See the previous approach.
  2. Deteriorating accuracy: As is the nature of time-series data, one cannot (should not) build a model and then continue to use it for long periods of time, because the dynamics in the underlying data often change significantly.

The safest "rebuild older than" way

The safest way to ensure a working production pipeline is to take into account the age of the models in the Model Zoo. This approach overcomes the second disadvantage of the previous approach. A user can define what should be considered as an "old" model. If TIM recognizes that an "old" model would be needed to forecast, a new model will be built instead and replace the old one.

older than

This approach still has one disadvantage:

  1. Data traffic.

The fastest "rebuild nothing" way

The fastest approach to set up a working production pipeline is to never rebuild a model. This approach simply uses all models included in the input Model Zoo, and tries to interpret them without building any new models. A user can trigger this behavior by setting the "None" option as the rebuilding policy. This solves the data traffic problem, but the responsibility to make sure that the Model Zoo is capable of producing every required forecast is on the user in this scenario. Only a small part of the data should be attached to the request. The exact size needed is defined by the "Data from" section of the Model Zoo.

none

This approach has the following two disadvantages:

  1. Deteriorating accuracy.
  2. No new situations: Situations for which there is no model in the Model Zoo will not be forecasted.

Problems with chaining Model Zoos

There are several problems that may happen when chaining models using different datasets.

  1. Using a dataset with more predictors. TIM will consider this to be a new situation and build new models accordingly.
  2. Using a dataset with less predictors. This can be fine, provided that the Model Zoo does not use any of the omitted predictors. If it does, TIM will consider this to be a new distinct situation.
  3. Using a dataset with a different target. TIM will not allow this and return an error.
  4. Using a dataset with a different size. TIM will return a warning, if any new models would need to be built. A user should pay extra attention the the results if this happens, because this may result in a lower than expected accuracy.