Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/kernels/gibbskernel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@

GibbsKernel(; lengthscale) = GibbsKernel(lengthscale)

function (k::GibbsKernel)(x, y)
function (k::GibbsKernel)(x, y, base_kernel::Kernel=SqExponentialKernel)

Check warning on line 39 in src/kernels/gibbskernel.jl

View check run for this annotation

Codecov / codecov/patch

src/kernels/gibbskernel.jl#L39

Added line #L39 was not covered by tests
lengthscale = k.lengthscale
lx = lengthscale(x)
ly = lengthscale(y)
l = invsqrt2 * hypot(lx, ly)
kernel = (sqrt(lx * ly) / l) * with_lengthscale(SqExponentialKernel(), l)
kernel = (sqrt(lx * ly) / l) * with_lengthscale(base_kernel(), l)

Check warning on line 44 in src/kernels/gibbskernel.jl

View check run for this annotation

Codecov / codecov/patch

src/kernels/gibbskernel.jl#L44

Added line #L44 was not covered by tests
return kernel(x, y)
end