Linearization
- class pmrf.stats.linearization.Linearization(J: Array, residual: Array, chol: Array, F: Array, names: tuple[str, ...], shapes: tuple[tuple[int, ...], ...], space: Space)
Bases:
ModuleThe linearisation of one fit at a model.
Built by
pmrf.objectives.evaluators.MarginalLogLikelihood.linearize(). Columns ofJ, and rows and columns ofF, follow the free parameters innamesorder, each flattened in C order to its size inshapes.- unflatten(vector: Array) dict[str, Array]
Map a flat vector over the parameters, such as a row of
F, back to names.
- F: Array
The Fisher matrix \(F = \sum_b J_b^\top \Sigma_{D,b}^{-1} J_b\), with shape
(p, p).
- J: Array
The Jacobian \(J = -\partial r / \partial \theta\) of the residual, with shape
(*batch, N, p).
- chol: Array
The lower Cholesky factor of \(\Sigma_D = K + \Sigma_n\), at its own batch shape, which broadcasts to
batch.
- names: tuple[str, ...]
The names of the free parameters, in column order.
- residual: Array
The residual \(r\) in event space, with shape
(*batch, N).