Back to models
Forecaster

TotoForecaster

Toto foundation model forecaster for zero-shot forecasting.

Quickstart

python
from sktime.forecasting.toto import TotoForecaster

estimator = TotoForecaster(seed=None, num_samples: int=1, samples_per_batch: int=1, prediction_type: str='median', scale_factor_exponent: int=10, stabilize_with_global: bool=True, use_memory_efficient_attention: bool=False, model_path: str='Datadog/Toto-Open-Base-1.0', device=None)

Parameters(8)

num_samplesint
Number of samples for probabilistic forecasting
samples_per_batchint, optional (default=1)
Control memory usage during inference
prediction_typestring, optional (default=’median’)
Type of prediction to generate (‘mean’ or ‘median’).
scale_factor_exponentint, optional (default=10)
Exponent for the scale factor used in the model.
stabilize_with_globalboolean, optional (default=True)
Whether to stabilize the model with global context.
use_memory_efficient_attentionboolean, optional (default=True)
Whether to use memory-efficient attention mechanisms using Xformers.
model_pathstring, optional (default=’Datadog/Toto-Open-Base-1.0’)
Path to the Toto huggingface model.
devicestring, optional (default=None)
Specifies the device on which to run the model on (‘cpu’ or ‘cuda’).

Examples

>>> from sktime.datasets import load_longley
>>> from sktime.forecasting.toto import TotoForecaster
>>> _, y = load_longley ()
>>> model = TotoForecaster ()
>>> model. fit (y) TotoForecaster()
>>> forecast = model. predict (fh = [1, 2, 5 ])

References

  1. [1 ] https://github.com/DataDog/toto