23 #ifndef _KERNEL_MATERN_HPP_ 24 #define _KERNEL_MATERN_HPP_ 39 void init(
size_t input_dim)
40 { n_params = 1; n_inputs = input_dim; };
42 double operator()(
const vectord &x1,
const vectord &x2)
44 double r = computeWeightedNorm2(x1,x2);
48 double gradient(
const vectord &x1,
const vectord &x2,
51 double r = computeWeightedNorm2(x1,x2);
61 void init(
size_t input_dim)
62 { n_params = input_dim; n_inputs = input_dim; };
64 double operator()(
const vectord &x1,
const vectord &x2)
66 double r = computeWeightedNorm2(x1,x2);
71 double gradient(
const vectord &x1,
const vectord &x2,
73 { assert(
false);
return 0.0; };
81 void init(
size_t input_dim)
82 { n_params = 1; n_inputs = input_dim; };
84 double operator()(
const vectord &x1,
const vectord &x2)
86 double r = sqrt(3.0) * computeWeightedNorm2(x1,x2);
91 double gradient(
const vectord &x1,
const vectord &x2,
94 double r = sqrt(3.0) * computeWeightedNorm2(x1,x2);
104 void init(
size_t input_dim)
105 { n_params = input_dim; n_inputs = input_dim; };
107 double operator()(
const vectord &x1,
const vectord &x2)
109 double r = sqrt(3.0) * computeWeightedNorm2(x1,x2);
114 double gradient(
const vectord &x1,
const vectord &x2,
117 assert(
false);
return 0.0;
126 void init(
size_t input_dim)
127 { n_params = 1; n_inputs = input_dim; };
129 double operator()(
const vectord &x1,
const vectord &x2)
131 double r = sqrt(5.0) * computeWeightedNorm2(x1,x2);
133 return (1+r*(1+r/3))*er;
135 double gradient(
const vectord &x1,
const vectord &x2,
138 double r = sqrt(5.0) * computeWeightedNorm2(x1,x2);
140 return r*(1+r)/3*r*er;
149 void init(
size_t input_dim)
150 { n_params = input_dim; n_inputs = input_dim; };
152 double operator()(
const vectord &x1,
const vectord &x2)
154 double r = sqrt(5.0) * computeWeightedNorm2(x1,x2);
156 return (1+r*(1+r/3))*er;
160 double gradient(
const vectord &x1,
const vectord &x2,
162 { assert(
false);
return 0.0; };
Matern ARD kernel of 1st order.
Matern isotropic kernel of 5th order.
Abstract class for isotropic kernel functors.
Namespace of the library interface.
Matern isotropic kernel of 1st order.
Matern ARD kernel of 3rd order.
Abstract class for anisotropic kernel functors using ARD (Automatic Relevance Determination) ...
Matern kernel of 3rd order.
Atomic (simple) kernel functions.
Matern ARD kernel of 5th order.