Builds the curvature matrix used for uncertainty—combining
the GP prior and the Poisson likelihood—at a given latent vector `f`.
Usage
llh(f, dist_k_inv, time_k_inv)
Arguments
- f
Numeric vector of latent values (length \(n \times nt\)).
- dist_k_inv
Inverse spatial kernel (precision) matrix.
- time_k_inv
Inverse temporal kernel (precision) matrix.
Value
A dense square matrix \(H\) of size `length(f)` × `length(f)`.
Details
Technically: returns the Hessian
$$H = -\Sigma^{-1} - \mathrm{diag}(\exp(f))$$
where \(\Sigma^{-1} = \text{dist\_k\_inv} \otimes \text{time\_k\_inv}\).
This is the Hessian of the log posterior (negative definite).