Stan Math Library
5.0.0
Automatic Differentiation
|
|
inline |
Returns a Matern 3/2 covariance matrix.
\[ k(x, x') = \sigma^2(1 + \sqrt{3} \sqrt{\sum_{k=1}^{K}\frac{d(x, x')^2}{l_k^2}}) exp(-\sqrt{3}\sqrt{\sum_{k=1}^{K}\frac{d(x, x')^2}{l_k^2}}) \]
where \(d(x, x')\) is the Euclidean distance.
T_x | type for each scalar |
T_s | type of element of parameter sigma |
T_l | type of each length scale parameter |
x | std::vector of Eigen vectors of scalars. |
length_scale | std::vector of length scales |
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 109 of file gp_matern32_cov.hpp.