predict_exposure#
Functions#
|
Predict the exposure-integrated posterior for a single out-of-sample test point |
Module Contents#
- smolgp.solvers.integrated.predict_exposure.predict_exposure(kernel, X, y, R, state_coords, conditioned_states, t_star: float, delta_star: float, instid_star: int)[source]#
Predict the exposure-integrated posterior for a single out-of-sample test point \((t_*, \delta_*, \mathrm{instid}_*)\) with \(\delta_* > 0\).
Returns the raw, unprojected augmented state (mean of shape
(n,)and covariance of shape(n, n), wheren = kernel.dimension), matching the signature ofIntegratedStateSpaceSolver.predict()for instantaneous queries. That is, the returned result has the test point’s exposure-integrated mean/variance staged at state indexkernel.d + instid_star. Thekernel.observation_modelis applied afterward in GaussianProcess.predict().The algorithm mirrors the instantaneous predict algorithm (Algorithm 1 in Rubenzahl & Hattori et al. 2026) but includes replaying the Kalman steps for any data points that overlap with the test exposure. A virtual extra instrument index is used to hold the test exposure’s state, which is reset at the start of the exposure.
Treat the test exposure as a new, unobserved measurement on a virtual extra instrument index
num_insts(one past the real ones), by buildingkernel_extwithnum_insts + 1. Let the test exposure span the interval \([a, b) = [t_* - \delta_*/2, t_* + \delta_*/2)\).Phase A: Transition from the filtered data point (or the prior, if retrodictive) immedietely before the test exposure start to the test state \(a\), then apply
kernel_ext.reset_matrixto zero the virtual instrument there.Phase B: scan over every real state strictly inside \([a, b)\) and replay the Kalman filter predict/reset/update steps. This correctly updates the etst prediction with overlapping real observations.
Phase C: one final predict-only transition from wherever Phase B left off to \(b\).
Phase D: RTS-smooth the result against the nearest future real state on or after \(b\). This is skipped if the test point ends after all observed data.
Because the test point is computed on a fully private index throughout,
instid_starcolliding with a real training instrument’s id is harmless.instid_staris only used to choose where in the returned(n,)/(n, n)arrays to stage the final probe mean/variance, so that the GP applies the observation model for the correct instrument.