SeasonalNaiveHyperparams
seasonal_naive_model.SeasonalNaiveHyperparams · inherits PydanticBaseModel
(No class summary provided)
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
sp |
int |
- | Seasonal period |
SeasonalNaiveModel
seasonal_naive_model.SeasonalNaiveModel · inherits BaseModel
Seasonal Naive model implementation.
__init__(self, params: Dict[str, Any], settings: Dict[str, Any])
Initialize Seasonal Naive model with model-specific parameters.
| 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, x_context: Optional[np.ndarray] = None, x_target: Optional[np.ndarray] = None, **kwargs: dict) -> "SeasonalNaiveModel"
Train the Seasonal Naive model on given data. For this model, "training" simply means storing the historical data for future lookups.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
y_context |
np.ndarray |
- | Past target values (pd.Series or np.ndarray). |
y_target |
np.ndarray |
- | Future target values (not used by this model, but included 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 |
dict |
- | Additional keyword arguments. |
Returns: Self (The fitted model instance.)
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)
Make predictions using the trained Seasonal Naive model.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
y_context |
np.ndarray |
- | Context time series values (pd.Series or np.ndarray). |
timestamps_context |
np.ndarray |
- | Timestamps for context data. |
timestamps_target |
np.ndarray |
- | Timestamps for target data. |
x_context |
Optional[np.ndarray] |
None |
(undocumented) |
x_target |
Optional[np.ndarray] |
None |
(undocumented) |
**kwargs |
dict |
- | Additional keyword arguments. |
Returns: np.ndarray (Model predictions with shape (num_series, forecast_horizon).)