45 bool result = CDotKernel::init(l,r);
67 float64_t result = compute_recursive1(avec, bvec, alen);
86 float64_t result = compute_recursive2(avec, bvec, alen);
107 int32_t offs=cardinality+1;
109 ASSERT(DP_len==(len+1)*offs)
111 for (int32_t j=0; j < len+1; j++)
114 for (int32_t k=1; k < d+1; k++)
121 for (int32_t j=k; j < len+1; j++)
122 DP[k*offs+j]=DP[k*offs+j-1]+avec[j-1]*bvec[j-1]*DP[(k-1)*offs+j-1];
142 int32_t d=cardinality;
143 for (int32_t i=0; i < len; i++)
146 for (int32_t k=1; k < d+1; k++)
149 for (int32_t i=0; i < len; i++)
151 vec_pow[i] *= avec[i]*bvec[i];
157 for (int32_t k=1; k < d+1; k++)
160 for (int32_t s=1; s < k+1; s++)
166 sum += sign*KD[k-s]*KS[s];
185 "not of type CANOVAKernel, but type %d!\n",
int32_t cardinality
degree parameter of kernel
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
ANOVA (ANalysis Of VAriances) kernel.
float64_t kernel(int32_t idx_a, int32_t idx_b)
float64_t compute_rec2(int32_t idx_a, int32_t idx_b)
Template class DotKernel is the base class for kernels working on DotFeatures.
virtual bool init(CFeatures *l, CFeatures *r)
virtual bool init_normalizer()
static CANOVAKernel * obtain_from_generic(CKernel *kernel)
CFeatures * rhs
feature vectors to occur on right hand side
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.
float64_t compute_rec1(int32_t idx_a, int32_t idx_b)