57 "Provided kernel (%s) must be of type CGaussianKernel!\n", kernel->
get_name());
88 CShiftInvariantKernel::init(l, r);
95 REQUIRE(w>0,
"width (%f) must be positive\n",w);
106 REQUIRE(
lhs,
"Left hand side features must be set!\n")
107 REQUIRE(
rhs,
"Rightt hand side features must be set!\n")
109 if (!strcmp(param->
m_name,
"log_width"))
114 #pragma omp parallel for
118 derivative(j, k)=
CMath::exp(-element)*element*2.0;
125 SG_ERROR(
"Can't compute derivative wrt %s parameter\n", param->
m_name);
149 void CGaussianKernel::register_params()
virtual const char * get_name() const =0
virtual void load_serializable_post()
Base class for the family of kernel functions that only depend on the difference of the inputs...
int32_t num_rhs
number of feature vectors on right hand side
virtual void load_serializable_post()
Class ShogunException defines an exception which is thrown whenever an error inside of shogun occurs...
void set_cache_size(int32_t size)
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.
int32_t cache_size
cache_size in MB
Class SGObject is the base class of all shogun objects.
virtual void set_disable_sqrt(bool state)
virtual SGMatrix< float64_t > get_parameter_gradient(const TParameter *param, index_t index=-1)
int32_t num_lhs
number of feature vectors on left hand side
virtual CSGObject * shallow_copy() const
The well known Gaussian kernel (swiss army knife for SVMs) computed on CDotFeatures.
virtual bool init_normalizer()
virtual float64_t distance(int32_t idx_a, int32_t idx_b) const
CFeatures * rhs
feature vectors to occur on right hand side
static CGaussianKernel * obtain_from_generic(CKernel *kernel)
all of classes and functions are contained in the shogun namespace
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 float64_t distance(int32_t idx_a, int32_t idx_b) const
static float64_t log(float64_t v)
virtual bool init(CFeatures *l, CFeatures *r)
virtual ~CGaussianKernel()
virtual void set_width(float64_t w)
virtual bool init(CFeatures *lhs, CFeatures *rhs)
virtual float64_t get_width() const