JuliaGaussianProcesses / Stheno.jl

Probabilistic Programming with Gaussian processes in Julia
Other
340 stars 26 forks source link

Add SparseFiniteGP type and associated functionality #136

Closed ElOceanografo closed 4 years ago

ElOceanografo commented 4 years ago

This addresses https://github.com/willtebbutt/Stheno.jl/issues/134, adding a SparseFiniteGP type that wraps two GPs for the observation and inducing points and can be plugged into Turing. The PR contains constructors and basic methods for the new type, mostly falling through to the underlying FiniteGP for the observation points. It provides a logpdf function that wraps the preexisting elbo method for sparse GPs, and also provides a convenience constructor for PseudoObs so that the following "just works":

x = 0:10
xu = 0:2:10
f = GP(Matern32(), GPC())
fx = SparseFiniteGP(f, x, xu)
y = rand(fx)
fpost = f | (fx ← y)

There are a couple of remaining issues/questions:

Comments on code, tests, organization, or style welcome...

codecov[bot] commented 4 years ago

Codecov Report

Merging #136 into master will increase coverage by 0.06%. The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   82.37%   82.43%   +0.06%     
==========================================
  Files          26       27       +1     
  Lines         749      763      +14     
==========================================
+ Hits          617      629      +12     
- Misses        132      134       +2     
Impacted Files Coverage Δ
src/Stheno.jl 100.00% <ø> (ø)
src/approximate_inference.jl 85.71% <85.71%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 80d3869...472f338. Read the comment docs.

ElOceanografo commented 4 years ago

To clarify, do you mean I should update the version number in Project.toml?

willtebbutt commented 4 years ago

To clarify, do you mean I should update the version number in Project.toml?

Yes please :)