Skip to content

Commit 360ce10

Browse files
authored
Update docstring of GibbsKernel (#395)
1 parent ab30149 commit 360ce10

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/kernels/gibbskernel.jl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
"""
1+
@doc raw"""
22
GibbsKernel(; lengthscale)
33
4-
# Definition
4+
Gibbs Kernel with lengthscale function `lengthscale`.
55
6-
The Gibbs kernel is non-stationary generalisation of the squared exponential
6+
The Gibbs kernel is a non-stationary generalisation of the squared exponential
77
kernel. The lengthscale parameter ``l`` becomes a function of
88
position ``l(x)``.
99
10-
For a constant function``l(x) = c``, one recovers the standard squared exponential kernel
11-
with lengthscale `c`.
10+
# Definition
1211
12+
For inputs ``x, x'``, the Gibbs kernel with lengthscale function ``l(\cdot)``
13+
is defined as
1314
```math
14-
k(x, y; l) = \\sqrt{ \\left(\\frac{2 l(x) l(y)}{l(x)^2 + l(y)^2} \\right) }
15-
\\quad \\rm{exp} \\left( - \\frac{(x - y)^2}{l(x)^2 + l(y)^2} \\right)
15+
k(x, x'; l) = \sqrt{\left(\frac{2 l(x) l(x')}{l(x)^2 + l(x')^2}\right)}
16+
\quad \exp{\left(-\frac{(x - x')^2}{l(x)^2 + l(x')^2}\right)}.
1617
```
1718
19+
For a constant function ``l \equiv c``, one recovers the [`SqExponentialKernel`](@ref)
20+
with lengthscale `c`.
21+
1822
# References
1923
2024
Mark N. Gibbs. "Bayesian Gaussian Processes for Regression and Classication." PhD thesis, 1997

0 commit comments

Comments
 (0)