Esc
Ask AIAnswers may be inaccurate; check the linked pages.Esc
Ask anything about these docs, like how to get started or what a function does.

MoiraiHyperparams

moirai_model.MoiraiHyperparams · inherits PydanticBaseModel

(No prose description provided.)

MoiraiModel

moirai_model.MoiraiModel · implements forecaster contract

(No prose description provided in the class docstring.)

__init__(self, params, settings)

Initialize Moirai model.

Parameter Type Default Description
params Dict[str, Any] - Model parameters dictionary
settings Dict[str, Any] - Settings dictionary containing device, python_version, etc.

train(self, y_context, y_target, timestamps_context, timestamps_target, **kwargs) -> MoiraiModel

"Train" the Moirai model (no training required for foundation models).

Parameters:

Parameter Type Default Description
y_context np.ndarray - Past target values (not used for training, for compatibility)
y_target np.ndarray - Future target values (not used for training, for compatibility)
timestamps_context np.ndarray - Timestamps for y_context (not used)
timestamps_target np.ndarray - Timestamps for y_target (not used)
**kwargs - - Additional keyword arguments

Returns: Self (The fitted model instance (for compatibility)).

predict(self, y_context, timestamps_context, timestamps_target, **kwargs) -> np.ndarray

Make predictions using the Moirai model.

Parameters:

Parameter Type Default Description
y_context np.ndarray - Recent/past target values, shape (context_steps, num_targets)
timestamps_context np.ndarray - Timestamps for y_context (not used for prediction)
timestamps_target np.ndarray - Timestamps for the prediction horizon (used to determine forecast length)
**kwargs - - (undocumented)

Returns: np.ndarray (Model prediction samples with shape (num_samples, forecast_horizon, num_targets)). Raises: ValueError (If model is not fitted, freq is not provided, or forecast length cannot be determined).