#include "Eigen/Dense"
Go to the source code of this file.
Functions |
Eigen::MatrixXf | covMaterniso3 (const Eigen::MatrixXf &x, const Eigen::MatrixXf &z, double sf2, double ell, bool diag=false) |
| Matern3 kernel. cov = sf2*(1+sqrt(3)/ell*d)*exp(-sqrt(3)/ell*d), in which d is the Euclidean distance of two points.
|
Eigen::MatrixXf | dist (const Eigen::MatrixXf &x, const Eigen::MatrixXf &z) |
| Euclidean distance between two vectors. dist = [d(x1, z1) d(x1, z2) ... d(x1, zn) ...... d(xm, z1) d(xm, z2) ... d(xm, zn)].
|
Function Documentation
Eigen::MatrixXf covMaterniso3 |
( |
const Eigen::MatrixXf & |
x, |
|
|
const Eigen::MatrixXf & |
z, |
|
|
double |
sf2, |
|
|
double |
ell, |
|
|
bool |
diag = false |
|
) |
| |
Matern3 kernel. cov = sf2*(1+sqrt(3)/ell*d)*exp(-sqrt(3)/ell*d), in which d is the Euclidean distance of two points.
- Parameters:
-
x | m by d(imension) input vector. |
z | n by d(imension) input vector. |
sf2 | prior variance. |
ell | lengthscale. |
diag | if diag is true, only the diagonal of covariance matrix is returned. |
- Returns:
- covariance matrix (or its diagonal).
Eigen::MatrixXf dist |
( |
const Eigen::MatrixXf & |
x, |
|
|
const Eigen::MatrixXf & |
z |
|
) |
| |
Euclidean distance between two vectors. dist = [d(x1, z1) d(x1, z2) ... d(x1, zn) ...... d(xm, z1) d(xm, z2) ... d(xm, zn)].
- Parameters:
-
x | 1 by m vector. |
z | 1 by n vector. |
- Returns:
- m by n distance matrix.