Gaussian#

class impulso.observation.Gaussian(*, name='gaussian', is_heavy_tailed=False)[source]#

Bases: ImpulsoModel

Gaussian observation errors — y_t ~ N(μ_t, Ω).

The default and the historical behaviour of the library. Under this adapter the volatility process’s Ω = L Lᵀ is simultaneously the scale matrix and the innovation covariance, so FittedVAR.sigma() and FittedVAR.innovation_covariance() agree exactly.

Parameters:
name#

Discriminator key for the registry (always “gaussian”).

Type:

Literal[‘gaussian’]

is_heavy_tailed#

Always False.

Type:

bool

build_likelihood(name, mu, chol, observed, dims=None)[source]#

Register the multivariate normal likelihood in the active PyMC model.

PyMC handles batched chol natively: a 2-D factor is shared by every observation, a 3-D (T, n, n) factor gives observation t its own.

Parameters:
  • name (str) – Name for the observed random variable (the pipeline uses “obs”).

  • mu (Any) – Conditional mean tensor, shape (T, n_vars).

  • chol (Any) – Lower-triangular Cholesky factor of Ω, shape (n_vars, n_vars) or (T, n_vars, n_vars).

  • observed (ndarray) – Observed endogenous matrix, shape (T, n_vars).

  • dims (tuple[str, ...] | None) – PyMC dims for the observed variable.

Returns:

The registered PyMC random variable.

Return type:

Any

draw_standardised_innovations(shape, rng, posterior)[source]#

Draw standardised innovations ξ with Cov[ξ] = I.

A single rng.standard_normal(shape) call and nothing else — this is the RNG contract that keeps seeded Gaussian forecasts bit-identical to every release before the error-distribution seam existed.

Parameters:
  • shape (tuple[int, ...]) – Draw shape, (chains, draws, n_vars).

  • rng (Generator) – Generator to consume.

  • posterior (xr.Dataset) – Unused; accepted for Protocol parity.

Returns:

Standard normal draws of shape shape.

Return type:

ndarray

model_config = {'frozen': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

variance_inflation(posterior)[source]#

Factor converting the scale matrix Ω into the innovation covariance.

Always 1.0 under Gaussian errors: Ω is the covariance.

Parameters:

posterior (xr.Dataset) – Unused; accepted for Protocol parity.

Returns:

The scalar 1.0.

Return type:

float