Stan Math Library
4.9.0
Automatic Differentiation
|
Eigen::Matrix< return_type_t< T_x1, T_x2, T_sigma >, Eigen::Dynamic, Eigen::Dynamic > stan::math::gp_dot_prod_cov | ( | const std::vector< Eigen::Matrix< T_x1, Eigen::Dynamic, 1 > > & | x1, |
const std::vector< Eigen::Matrix< T_x2, Eigen::Dynamic, 1 > > & | x2, | ||
const T_sigma & | sigma | ||
) |
Returns a dot product covariance matrix of differing x's.
A member of Stan's Gaussian Process Library.
\(k(x,x') = \sigma^2 + x \cdot x'\)
A dot product covariance matrix is the same covariance matrix as in bayesian regression with \(N(0,1)\) priors on regression coefficients and a \(N(0,\sigma^2)\) prior on the constant function. See Rasmussen and Williams et al 2006, Chapter 4.
T_x1 | type of first std::vector of elements |
T_x2 | type of second std::vector of elements |
T_sigma | type of sigma |
x1 | std::vector of elements that can be used in dot_product |
x2 | std::vector of elements that can be used in dot_product |
sigma | constant function that can be used in stan::math::square |
std::domain_error | if sigma < 0, nan or inf or if x1 or x2 are nan or inf |
Definition at line 157 of file gp_dot_prod_cov.hpp.