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.

VarmaxHyperparams

chronax.models.varmax_model.VarmaxHyperparams · inherits PydanticBaseModel

Pydantic model defining the hyperparameters for the VARMAX model.

Attributes

Attribute Type Default Description
p int - Number of AR parameters
q int - Number of MA parameters
trend Literal["n", "c", "t", "ct"] "c" Deterministic trend: 'n' none, 'c' constant, 't' linear, 'ct' both

VarmaxModel

chronax.models.varmax_model.VarmaxModel · inherits BaseModel

Multivariate VARMAX model.

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

Initializes the VARMAX model wrapper.

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) -> VarmaxModel

Train VARMAX on context + train targets (and optional stacked covariates).

Parameter Type Default Description
y_context np.ndarray - (undocumented)
y_target np.ndarray - (undocumented)
timestamps_context np.ndarray - (undocumented)
timestamps_target np.ndarray - (undocumented)
x_context Optional[np.ndarray] None (undocumented)
x_target Optional[np.ndarray] None (undocumented)
**kwargs dict - (undocumented)

Returns: VarmaxModel (the fitted forecaster; sets self._model).

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

Forecast using the fitted VARMAX model (first num_targets columns only).

Parameter Type Default Description
y_context np.ndarray - (undocumented)
timestamps_context np.ndarray - (undocumented)
timestamps_target np.ndarray - (undocumented)
x_context Optional[np.ndarray] None (undocumented)
x_target Optional[np.ndarray] None (undocumented)
**kwargs dict - (undocumented)

Returns: np.ndarray.