|
| | Matern (const Matern &)=default |
| |
| | Matern (Matern &&)=default |
| |
| Matern & | operator= (const Matern &)=default |
| |
| Matern & | operator= (Matern &&)=default |
| |
| | Matern (const size_t &index, const double &nu, const int &indexX=-1) |
| |
| double | eval (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, const Eigen::VectorXd &par) const |
| |
| double | evalGradient (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, const Eigen::VectorXd &par, const size_t &i) const |
| |
| double | evalHessian (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, const Eigen::VectorXd &par, const size_t &i, const size_t &j) const |
| |
| virtual | ~Covariance ()=default |
| |
General Matérn covariance function.
Mathematical Formulation Evaluates the Matérn covariance function between two inputs \(\mathbf{x}_1, \mathbf{x}_2\):
\[
k(\mathbf{x}_1, \mathbf{x}_2) = \frac{2^{1-\nu}}{\Gamma(\nu)} \left( \frac{\sqrt{2\nu}d}{\ell} \right)^\nu K_\nu\left( \frac{\sqrt{2\nu}d}{\ell} \right)
\]
where \(d\) is the distance, \(\ell = \theta_{\text{index}}\) is the lengthscale hyperparameter, \(\nu\) is the smoothness parameter, \(\Gamma\) is the Gamma function, and \(K_\nu\) is the modified Bessel function of the second kind.
Implementation Algorithm
- Computes distance \(d\) and scaling parameter \(r = \frac{\sqrt{2\nu}d}{\ell}\).
- Evaluates the term using
std::tgamma and Boost's boost::math::cyl_bessel_k implementation of the modified Bessel function.
- Evaluates analytical derivatives with respect to the lengthscale \(\ell\).