Skip to content
3 changes: 2 additions & 1 deletion src/finite_gp_projection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
The finite-dimensional projection of the AbstractGP `f` at `x`. Assumed to be observed under
Gaussian noise with zero mean and covariance matrix `Σy`
"""
struct FiniteGP{Tf<:AbstractGP,Tx<:AbstractVector,TΣ} <: AbstractMvNormal
struct FiniteGP{Tf<:AbstractGP,Tx<:AbstractVector,TΣ<:AbstractMatrix{<:Real}} <:
AbstractMvNormal
f::Tf
x::Tx
Σy::TΣ
Expand Down
9 changes: 9 additions & 0 deletions test/finite_gp_projection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,15 @@ end
first(FiniteDifferences.grad(central_fdm(3, 1), Base.Fix1(logpdf, fx), y))
@test Distributions.sqmahal!(r, fx, Y) ≈ Distributions.sqmahal(fx, Y)
end

@testset "FiniteGP with UniformScaling" begin
f = GP(SqExponentialKernel())
fx = f(rand(10), 2.0*I)
# for now, just check that it runs
_ = mean(fx)
_ = mean_and_cov(fx)
_ = rand(fx)
end
end

@testset "Docs" begin
Expand Down