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

◆ gp_dot_prod_cov() [4/6]

template<typename T_x , typename T_sigma >
Eigen::Matrix< return_type_t< T_x, T_sigma >, Eigen::Dynamic, Eigen::Dynamic > stan::math::gp_dot_prod_cov ( const std::vector< T_x > &  x,
const T_sigma &  sigma 
)

Returns a dot product covariance matrix.

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_xtype of std::vector of double
T_sigmatype of sigma
Parameters
xstd::vector of elements that can be used in transpose and multiply This function assumes each element of x is the same size.
sigmaconstant function that can be used in stan::math::square
Returns
dot product covariance matrix that is positive semi-definite
Exceptions
std::domain_errorif sigma < 0, nan, inf or x is nan or infinite

Definition at line 100 of file gp_dot_prod_cov.hpp.