Go to the documentation of this file. 1 #ifndef HOPS_SQUAREDEXPONENTIALKERNEL_HPP
2 #define HOPS_SQUAREDEXPONENTIALKERNEL_HPP
7 template<
typename MatrixType,
typename VectorType>
18 for (
long i = 0; i < x.rows(); ++i) {
19 for (
long j = 0; j < y.rows(); ++j) {
20 VectorType diff = (x.row(i) - y.row(j)).transpose();
21 double squaredDistance = diff.transpose() * diff;
23 covariance(i, j) = val;
36 #endif // HOPS_SQUAREDEXPONENTIALKERNEL_HPP
SquaredExponentialKernel(double m_sigma=1, double length=1)
Definition: SquaredExponentialKernel.hpp:10
Definition: SquaredExponentialKernel.hpp:8
Eigen::MatrixXd MatrixType
Definition: MatrixType.hpp:7
Definition: CsvReader.hpp:8
MatrixType operator()(const MatrixType &x, const MatrixType &y)
Definition: SquaredExponentialKernel.hpp:16
Eigen::VectorXd VectorType
Definition: VectorType.hpp:7
double m_sigma
Definition: SquaredExponentialKernel.hpp:31
double length
Definition: SquaredExponentialKernel.hpp:32