DiagonalNoise#

class hybrid_aif.inference.DiagonalNoise[source]#

Bases: NamedTuple

An observation noise of independent readings, N(0, diag(scale²)), in the form the state-space update reads.

scale (..., d_obs) holds the readings’ standard deviations, which must be strictly positive (a zero or negative value is not checked and gives an infinite or wrong log determinant). low_rank (..., d_obs, k), when given, adds a correlated part of rank at most k: the noise covariance is then diag(scale²) + low_rank low_rankᵀ (the residual covariance of an unscented reading, linear_model()). The update treats that part as k further standard-normal latent coordinates read through low_rank, so it stays in state space at dimension d + k. The update checks the shapes (statically, at no cost under jit): scale’s last axis is the reading’s length, its batch axes are no more than the head’s (a Cholesky factor passed as scale is refused), and low_rank’s d_obs axis matches scale’s.

scale: Array#

Alias for field number 0

low_rank: Array | None#

Alias for field number 1

cov()[source]#

The dense (..., d_obs, d_obs) covariance.

chol()[source]#

The dense lower Cholesky factor of cov(): diag(scale) without low_rank.

static __new__(_cls, scale, low_rank=None)#

Create new instance of DiagonalNoise(scale, low_rank)