LinearGaussianObservation#

class hybrid_aif.LinearGaussianObservation[source]#

Bases: Module

y = H x + c + eps: a linear-Gaussian modality over one Gaussian state factor.

Construct with H=/c= to have head assembled. H, c and the noise are each either shared ((d_obs, d) / (d_obs,) / (d_obs, d_obs)) or per-mode, with leading parent axes parent_shape (the categorical parents named after the observed state factor in A_deps), broadcast like the per-mode F_j of LinearGaussianTransition. Every inference consumer reads the R_chol property, which lowers a distributional noise by its expected precision.

__init__(head=None, noise=None, *, H=None, c=None)[source]#
head: Array | MatrixNormal#

The augmented [H | c]: (d_obs, d + 1), or (*parent_shape, d_obs, d + 1) per mode; a point value or a MatrixNormal posterior over it (never separate posteriors over H and c, which are coupled).

noise: Array | InverseGamma | InverseWishart | Parameter#

A point R_chol (lower triangular (d_obs, d_obs), or (*parent_shape, d_obs, d_obs) per mode), or the conjugate posterior over R (InverseGamma, InverseWishart), which makes it learnable and samplable; or Parameter(name), reading a noise held in SystemParams.parameters (one noise several modalities or transitions read; design: process-noise-learning.md D4).

property H: Array#

The map part of the head (point value, or the posterior mean).

property c: Array#

The offset part of the head (point value, or the posterior mean).

property learnable_head: bool#

Capability, per-field: the head slot holds a posterior.

property R_chol: Array#

The noise as an R_chol array: the point value itself, or the expected-precision lowering of a distributional noise. A noise map has no one value: read it at a mean with R_chol_at().

property learnable_noise: bool#

Capability, per-field: the slot holds a posterior, not a value.

property noise_map: bool#

Capability, per-field: the noise is a NoiseMap over the observed state, not a value or a posterior.

property noise_levels: int#

How many leading level axes the noise map carries, one per categorical parent (zero for a plain map, a point or a posterior).

R_chol_at(loc)[source]#

The noise as an R_chol array at a belief’s mean loc: a point or conjugate noise is the same everywhere; a noise map is evaluated there, the extended filter’s convention (design: planning-with-observations.md D3). A levelled map returns every level’s factor, leading (*levels, ...) like a per-mode R_chol.