Stan Math Library
4.9.0
Automatic Differentiation
|
|
inline |
Returns a Matern 5/2 covariance matrix with one input vector.
\[ k(x, x') = \sigma^2\bigg(1 + \frac{\sqrt{5}d(x, x')}{l} + \frac{5d(x, x')^2}{3l^2}\bigg) exp\bigg(-\frac{5 d(x, x')}{l}\bigg) \]
where \( d(x, x') \) is the Euclidean distance.
T_x | type of elements contained in vector x |
T_s | type of element of sigma, the magnitude |
T_l | type of elements of length scale |
x | std::vector of elements that can be used in stan::math::distance |
length_scale | length scale |
sigma | standard deviation that can be used in stan::math::square |
std::domain | error if sigma <= 0, l <= 0, or x is nan or inf |
Definition at line 41 of file gp_matern52_cov.hpp.