Stan Math Library
5.0.0
Automatic Differentiation
|
|
inline |
Returns a Matern 5/2 covariance matrix with two different input vectors.
\[ 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_x1 | type of elements contained in vector x1 |
T_x2 | type of elements contained in vector x2 |
T_s | type of element of sigma, the magnitude |
T_l | type of elements of length scale |
x1 | std::vector of elements that can be used in stan::math::distance |
x2 | 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 188 of file gp_matern52_cov.hpp.