Stan Math Library
4.9.0
Automatic Differentiation
|
|
inline |
Returns a Matern 5/2 covariance matrix with one input vector with automatic relevance determination (ARD).
\[ k(x, x') = \sigma^2\bigg(1 + \sqrt{5}\sqrt{\sum_{k=1}^{K}\frac{d(x, x')^2}{l_k^2}} + \frac{5}{3} \sqrt{\sum_{k=1}^{K}\frac{d(x, x')^2}{l_k^2}}\bigg) exp\bigg(-\frac{5}{3}\bigg(\sqrt{\sum_{k=1}^K{\frac{d(x, x')^2}{l_k^2}} }\bigg)\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 in vector 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 |
std::invalid_argument | if length scale size != dimension of x |
Definition at line 112 of file gp_matern52_cov.hpp.