15 using namespace shogun;
26 void CGaussianARDKernel::init()
32 #ifdef HAVE_LINALG_LIB
51 return CLinearARDKernel::init(l,r);
58 SG_SERROR(
"Provided kernel is not of type CGaussianARDKernel!\n");
77 if (!strcmp(param->m_name, "weights"))
88 derivative(j,k)=compute_gradient_helper(bvec, bvec, scale, index);
93 else if (!strcmp(param->
m_name,
"width"))
110 SG_ERROR(
"Can't compute derivative wrt %s parameter\n", param->
m_name);
117 REQUIRE(
rhs,
"Right features (rhs) not set!\n")
121 linalg::
add(avec, bvec, avec, 1.0, -1.0);
122 float64_t result=compute_helper(avec, avec);
float distance(CJLCoverTreePoint p1, CJLCoverTreePoint p2, float64_t upper_bound)
int32_t num_rhs
number of feature vectors on right hand side
Linear Kernel with Automatic Relevance Detection computed on CDotFeatures.
float64_t kernel(int32_t idx_a, int32_t idx_b)
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
Features that support dot products among other operations.
Gaussian Kernel with Automatic Relevance Detection computed on CDotFeatures.
virtual void set_width(float64_t w)
void add(Matrix A, Matrix B, Matrix C, typename Matrix::Scalar alpha=1.0, typename Matrix::Scalar beta=1.0)
int32_t num_lhs
number of feature vectors on left hand side
virtual ~CGaussianARDKernel()
CFeatures * rhs
feature vectors to occur on right hand side
static CKernel * obtain_from_generic(CSGObject *kernel)
virtual EKernelType get_kernel_type()=0
CFeatures * lhs
feature vectors to occur on left hand side
The class Features is the base class of all feature objects.
static float64_t exp(float64_t x)
virtual SGMatrix< float64_t > get_parameter_gradient(const TParameter *param, index_t index=-1)
static float64_t log(float64_t v)