23 #ifndef _KERNEL_RQ_HPP_ 24 #define _KERNEL_RQ_HPP_ 38 void init(
size_t input_dim)
39 { n_params = 2; n_inputs = input_dim; };
41 double operator()(
const vectord &x1,
const vectord &x2)
43 double rl = computeWeightedNorm2(x1,x2);
44 double k = rl*rl/(2*params(1));
45 return std::pow(1+k,-params(1));
49 double gradient(
const vectord &x1,
const vectord &x2,
51 { assert(
false);
return 0.0; };
Abstract class for isotropic kernel functors.
Namespace of the library interface.
Rational quadratic (Student's t) kernel.
Atomic (simple) kernel functions.