epiforecasts / EpiNow2

Estimate Realtime Case Counts and Time-varying Epidemiological Parameters
https://epiforecasts.io/EpiNow2/dev/
Other
116 stars 33 forks source link

Vectorise GPs #757

Closed seabbs closed 3 months ago

seabbs commented 3 months ago

See #742

SamuelBrand1 commented 3 months ago

I had a look at the PR linked to this issue and I'm super impressed. Its based on https://link.springer.com/article/10.1007/s11222-022-10167-2 .

What I hadn't processed on the first skim of that paper is that the Hilbert space induced by the eigenfunctions of Laplace op $\nabla^2$ with Dirichlet BCs is fixed.

The only place that different (stationary) choices of GP comes in is via the spectral density map $s_\theta$ on the eigenvals of Hilbert basis functions. Thats makes it really easy to operationalise this kind of approx. for any GP that has an easy to compute (e.g. known analytic) spectral density function.

This is especially good for epi modelling where its common for the GP to be representing the prior distribution over a latent $t -> \log R_t$ function compared to other approx GP methods that are more aimed at choosing inducing points etc.

SamuelBrand1 commented 3 months ago

Obviously, non-stationary GPs are out of scope (they don't have a spectral density function).

But piecewise stationary representations would be in scope of this method. However, I'm not sure the eigfuncs with $\phi_j(x) = 0$ boundary conditions are the best basis set in that case?

seabbs commented 3 months ago

Thanks @SamuelBrand1! Do you think the maths as implemented in #742 makes sense for the theory?

I agree non-stationary are out of scope but that piecewise could make sense. Do you have any thoughts about a better basis set?

SamuelBrand1 commented 3 months ago

If it was also computationally efficient, having the basis functions join at the boundary would make sense? But there might be better ways to achieve that.

SamuelBrand1 commented 3 months ago

Thanks @SamuelBrand1! Do you think the maths as implemented in #742 makes sense for the theory?

From my read it looked the right approach, obviously bugs can happen.