20 using namespace shogun;
67 for (int32_t i=0; i<num_vec; i++)
68 buf[i]=df->
dot(i,df, i);
76 CDotKernel::init(l, r);
90 int32_t len_features, power;
92 power=(len_features%2==0) ? (len_features+1):len_features;
97 if (result_multiplier<=0)
100 result_multiplier=pow(result_multiplier, power);
102 return result_multiplier*exp(-result/
width);
108 precompute_squared();
111 void CGaussianKernel::precompute_squared()
124 void CGaussianKernel::init()
virtual void load_serializable_post()
void set_compact_enabled(bool compact)
virtual void load_serializable_post()
Class ShogunException defines an exception which is thrown whenever an error inside of shogun occurs...
virtual float64_t dot(int32_t vec_idx1, CDotFeatures *df, int32_t vec_idx2)=0
virtual int32_t get_num_vectors() const =0
virtual float64_t compute(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.
Template class DotKernel is the base class for kernels working on DotFeatures.
#define SG_ADD(param, name, description, ms_available)
virtual bool init_normalizer()
CFeatures * rhs
feature vectors to occur on right hand side
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 bool init(CFeatures *l, CFeatures *r)
virtual ~CGaussianKernel()
#define SG_MALLOC(type, len)
virtual void set_width(float64_t w)