Zurück zu den Modellen
Forecaster

MantisForecaster

Kategoriale MerkmaleIn-Sample-PrognoseintervalleMultivariat

Forecaster using Mantis time-series foundation model embeddings.

Mantis is primarily a time-series classification foundation model. This forecaster uses its frozen backbone as a feature extractor on rolling history windows, then fits a regression model to predict the next value. Multi-step forecasts are generated recursively.

Schnellstart

python
from sktime.forecasting.mantis import MantisForecaster

estimator = MantisForecaster(checkpoint='paris-noah/MantisV2', model_version='v2', context_length=512, seq_len=512, regressor=None, batch_size=256, device='auto', ignore_deps=False)

Tags

Fähigkeiten

  • Kategoriale Merkmale
  • In-Sample-Prognoseintervalle: Unterstützt
  • Multivariat
  • In-Sample-Vorhersagen: Nicht unterstützt
  • Prognoseintervalle: Nicht unterstützt
  • Fehlende Werte: Nicht unterstützt
  • Exogene Variablen: Nicht unterstützt

Eigenschaften

Prognosehorizont beim Fit nötigrequires-fh-in-fit
Nein
X und y brauchen denselben IndexX-y-must-have-same-index
Ja

Parameter(7)

checkpointstr or None, default=”paris-noah/MantisV2”

Hugging Face checkpoint to load via Mantis from_pretrained. If None, use a randomly initialized Mantis backbone.

model_version{“v1”, “v2”}, default=”v2”
Mantis architecture version. Use “v1” for “paris-noah/Mantis-8M” and “paris-noah/MantisPlus”; use “v2” for “paris-noah/MantisV2”.
context_lengthint, default=512
Number of most recent observations used for each supervised window.
seq_lenint, default=512

Length passed to Mantis. If different from context_length, windows are resized with linear interpolation.

regressorsklearn regressor or None, default=None

Regression model trained on Mantis embeddings. If None, Ridge() is used.

batch_sizeint, default=256
Batch size for Mantis embedding extraction.
devicestr, default=”auto”
Torch device. If “auto”, use CUDA when available, otherwise CPU.

Beispiele

>>> from sktime.datasets import load_airline
>>> from sktime.forecasting.mantis import MantisForecaster
>>> y = load_airline ()
>>> forecaster = MantisForecaster (context_length = 24)
>>> forecaster. fit (y) MantisForecaster(
... )
>>> y_pred = forecaster. predict (fh = [1, 2, 3 ])

Referenzen

[1]

Feofanov et al., “Mantis: Lightweight Calibrated Foundation Model for User-Friendly Time Series Classification”, 2025. https://arxiv.org/abs/2502.15637