MoiraiHyperparams
moirai_model.MoiraiHyperparams · inherits PydanticBaseModel
(No description provided in source.)
MoiraiModel
moirai_model.MoiraiModel · inherits BaseModel
(No description provided in source.)
__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, x_context=None, x_target=None, **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) |
x_context |
Optional[np.ndarray] |
None |
(undocumented) |
x_target |
Optional[np.ndarray] |
None |
(undocumented) |
**kwargs |
Any |
- | Additional keyword arguments |
Returns: MoiraiModel (The fitted model instance (for compatibility)).
predict(self, y_context, timestamps_context, timestamps_target, x_context=None, x_target=None, **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) |
x_context |
Optional[np.ndarray] |
None |
(undocumented) |
x_target |
Optional[np.ndarray] |
None |
(undocumented) |
**kwargs |
Any |
- | (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).