Class mcovar_funct_quad_correl (o2scl)¶
-
template<class vec_t, class vec2_t>
class mcovar_funct_quad_correl : public o2scl::mcovar_base<vec_t, vec2_t>¶ Multidimensional covariance function using radial basis functions with quadratic correlation length and a noise term.
The covariance function is
\[ K_{ij} = \prod_k \exp \left[ \frac{ - \left(x_{ik} - x_{jk}\right)^2} {2 d_k^2} \right] \]where\[ d_k^2 \equiv \left[\ell_k^2 + m_k^2 \left( x_{ik} + x_{jk} - n_k\right)^2\right] \, . \]The values of \( \ell_k \) are stored in len, the values of \( m_k \) are stored in slope, and the values of \( n_k \) are stored in pos.Public Functions
-
inline virtual size_t get_n_params()¶
Get the number of parameters.
-
template<class vec3_t, class vec4_t>
inline double covar_tl(const vec3_t &x1, const vec4_t &x2)¶ The covariance function template.
-
template<class vec3_t, class vec4_t>
inline double deriv_tl(const vec3_t &x1, const vec4_t &x2, size_t ix)¶ The template for the derivative of the covariance function.
This function computes
\[ \frac{\partial K_{ij}}{\partial x_{ik}} = \frac{K_{ij} z_k}{d_k^4} \, . \]where\[ z_k \equiv \left[m_k^2 \left( n_k - 2 x_{jk} \right) \left( x_{ik} + x_{jk} - n_k\right) - \ell_k^2\right] \left( x_{ik} - x_{jk} \right) \]
-
inline virtual double deriv(const vec_t &x1, const vec2_t &x2, size_t ix)¶
The derivative of the covariance function with respect to one element of the first argument.
See deriv_tl().
-
template<class vec3_t, class vec4_t>
inline double deriv2_tl(const vec3_t &x1, const vec4_t &x2, size_t ix, size_t iy)¶ Template for the second derivative of the covariance function with respect to the first argument.
This function computes
\[ \frac{\partial^2 K_{ij}}{\partial x_{ik} \partial x_{im}} \, . \]If \( k \neq m \), then\[ \frac{\partial^2 K_{ij}}{\partial x_{ik} \partial x_{im}} = \frac{K_{ij} z_k z_m}{d_k^4 d_m^4} \, . \]Otherwise\[ \frac{\partial^2 K_{ij}}{\partial x_{ik}^2} = \frac{K_{ij}}{d_k^4} \left[ \frac{z_k^2}{d_k^4} + \frac{\partial z_k}{\partial x_{ik}} - \frac{4 z_k m_k^2}{d_k^2} \left( x_{ik} + x_{jk} - n_k \right) \right] \]where\[ \frac{\partial z_k}{\partial x_{ik}} = m_k^2 \left( n_k - 2 x_{jk} \right) \left( x_{ik} - x_{jk} \right) - \left[ \ell_k^2 - m_k^2 \left( n_k - 2 x_{jk} \right) \left( x_{ik} + x_{jk} - n_k\right) \right] \]
-
inline virtual double deriv2(const vec_t &x1, const vec2_t &x2, size_t ix, size_t iy)¶
The second derivative of the covariance function with respect to the first argument.
See deriv2_tl().
-
inline virtual size_t get_n_params()¶