MomentHyperparams
moment_model.MomentHyperparams · inherits PydanticBaseModel
(No summary provided)
__init__(self)
(No parameters defined beyond inherited ones)
MomentDataset
moment_model.MomentDataset · inherits Dataset
Dataset class for MOMENT model training and inference.
__init__(self, data: np.ndarray, context_length: int, prediction_length: int)
(No prose summary)
| Parameter | Type | Default | Description |
|---|---|---|---|
data |
np.ndarray |
- | (undocumented) |
context_length |
int |
- | (undocumented) |
prediction_length |
int |
- | (undocumented) |
MomentModel
moment_model.MomentModel · inherits BaseModel
MOMENT model wrapper for time series forecasting, extending FoundationModel.
__init__(self, params: Dict[str, Any], settings: Dict[str, Any])
(No prose summary)
| Parameter | Type | Default | Description |
|---|---|---|---|
params |
Dict[str, Any] |
- | (undocumented) |
settings |
Dict[str, Any] |
- | (undocumented) |
train(self, y_context: np.ndarray, y_target: np.ndarray, timestamps_context: np.ndarray, timestamps_target: np.ndarray, **kwargs: dict) -> "MomentModel"
(No prose summary)
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
y_context |
np.ndarray |
- | (undocumented) |
y_target |
np.ndarray |
- | (undocumented) |
timestamps_context |
np.ndarray |
- | (undocumented) |
timestamps_target |
np.ndarray |
- | (undocumented) |
**kwargs |
dict |
- | (undocumented) |
Returns: MomentModel (the fitted model).
predict(self, y_context: np.ndarray, timestamps_context: np.ndarray, timestamps_target: np.ndarray, **kwargs: dict) -> np.ndarray
Make predictions using the trained MOMENT model.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
y_context |
np.ndarray |
- | Recent/past target values |
timestamps_context |
np.ndarray |
- | Timestamps for context data (not used) |
timestamps_target |
np.ndarray |
- | Timestamps for target data (used for determining forecast_horizon) |
**kwargs |
dict |
- | Additional arguments (unused) |
Returns: np.ndarray (Model predictions with shape (channels, forecast_horizon)).