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.

MoiraiMoeHyperparams

moirai_moe_model.MoiraiMoeHyperparams · inherits PydanticBaseModel

(Empty Pydantic model for hyperparameters.)

MoiraiMoeModel

moirai_moe_model.MoiraiMoeModel · inherits BaseModel

__init__(self, params: Dict[str, Any], settings: Dict[str, Any])

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: np.ndarray, y_target: np.ndarray, timestamps_context: np.ndarray, timestamps_target: np.ndarray, x_context: Optional[np.ndarray] = None, x_target: Optional[np.ndarray] = None, **kwargs) -> MoiraiMoeModel

"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 - (undocumented)

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

predict(self, y_context: np.ndarray, timestamps_context: np.ndarray, timestamps_target: np.ndarray, x_context: Optional[np.ndarray] = None, x_target: Optional[np.ndarray] = None, **kwargs: dict) -> np.ndarray

Make predictions using the MoiraiMoE 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 dict - (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.