Closed ElOceanografo closed 4 years ago
Merging #136 into master will increase coverage by
0.06%
. The diff coverage is85.71%
.
@@ 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.
To clarify, do you mean I should update the version number in Project.toml?
To clarify, do you mean I should update the version number in Project.toml?
Yes please :)
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 underlyingFiniteGP
for the observation points. It provides alogpdf
function that wraps the preexistingelbo
method for sparse GPs, and also provides a convenience constructor forPseudoObs
so that the following "just works":There are a couple of remaining issues/questions:
SparseFiniteGP
by doingfx = f(x, xu)
(using the variables from the example above). However, this conflicts with this constructor forFiniteGP
, where the secondAbstractArray
in the function signature is interpreted as the diagonal of the observation covariance matrix. I like that compact definition, but using it would likely mean a breaking change (i.e. requiring users writef(x, Diagonal(σ²))
instead off(x, σ²)
).cov(fx::SparseFiniteGP)
throw an error instead of calculating the covariance of the observation GP. This follows behavior in base for e.g.inv(A::SparseArrays.AbstractSparseMatrixCSC)
. The use case for a sparse approximation is by default one where you don't want to or can't use the full covariance matrix, so I think this is the safe and fast option for this behavior. If the user really wants the dense covariance matrix, she can docov(f.fobs)
.Comments on code, tests, organization, or style welcome...