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

◆ gp_dot_prod_cov() [5/6]

template<typename T_x1 , typename T_x2 , typename T_sigma >
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.

Template Parameters
T_x1type of first std::vector of elements
T_x2type of second std::vector of elements
T_sigmatype of sigma
Parameters
x1std::vector of elements that can be used in dot_product
x2std::vector of elements that can be used in dot_product
sigmaconstant function that can be used in stan::math::square
Returns
dot product covariance matrix that is not always symmetric
Exceptions
std::domain_errorif 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.