Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ gp_exponential_cov() [4/6]

template<typename T_x , typename T_s , typename T_l >
Eigen::Matrix< return_type_t< T_x, T_s, T_l >, Eigen::Dynamic, Eigen::Dynamic > stan::math::gp_exponential_cov ( const std::vector< Eigen::Matrix< T_x, -1, 1 > > &  x,
const T_s &  sigma,
const std::vector< T_l > &  length_scale 
)
inline

Returns a Matern exponential covariance matrix.

\[ k(x, x') = \sigma^2 exp(-\sum_{k=1}^K\frac{d(x, x')}{l_k}) \]

where d(x, x') is the Euclidean distance.

Template Parameters
T_xtype for each scalar
T_stype for each parameter sigma
T_ltype for each length scale parameter
Parameters
xstd::vector of Eigen::vectors of scalars
sigmastandard deviation that can be used in stan::math::square
length_scalestd::vector of length scales
Exceptions
std::domainerror if sigma <= 0, l <= 0, or x is nan or inf

Definition at line 103 of file gp_exponential_cov.hpp.