12 #ifndef _WEIGHTEDDEGREEPOSITIONSTRINGKERNEL_H___
13 #define _WEIGHTEDDEGREEPOSITIONSTRINGKERNEL_H___
62 int32_t size, int32_t
degree,
111 virtual const char*
get_name()
const {
return "WeightedDegreePositionStringKernel"; }
121 int32_t p_count, int32_t *IDX,
float64_t * alphas)
138 int32_t count, int32_t *IDX,
float64_t * alphas, int32_t tree_num,
139 int32_t upto_tree=-1);
177 int32_t num_vec, int32_t* vec_idx,
float64_t* target,
178 int32_t num_suppvec, int32_t* IDX,
float64_t* alphas,
189 SG_DEBUG(
"disabling compact trie nodes with FASTBUTMEMHUNGRY\n")
199 SG_ERROR(
"unknown optimization type\n")
235 int32_t idx,
float64_t * subkernel_contrib)
243 SG_ERROR(
"CWeightedDegreePositionStringKernel optimization not initialized\n")
259 for (int32_t i=0; i<num_weights; i++)
262 for (int32_t i=0; i<num_weights; i++)
275 int32_t num_weights2=w.
vlen;
278 if (num_weights!=num_weights2)
279 SG_ERROR(
"number of weights do not match\n")
282 for (int32_t i=0; i<num_weights; i++)
290 for (int32_t i=0; i<num_weights; i++)
293 weights[i*mkl_stepsize+j] = weights2[i] ;
297 for (int32_t i=0; i<num_weights; i++)
300 weights[i*mkl_stepsize+j] = weights2[i] ;
357 num_weights = degree*
length ;
529 int32_t max_degree, int32_t& num_feat, int32_t& num_sym,
530 float64_t* target, int32_t num_suppvec, int32_t* IDX,
542 int32_t &num_feat, int32_t num_suppvec, int32_t* IDX,
557 int32_t max_degree, int32_t& num_feat, int32_t& num_sym,
558 float64_t* w_result, int32_t num_suppvec, int32_t* IDX,
574 int32_t max_degree, int32_t& num_feat, int32_t& num_sym,
575 float64_t* poim_result, int32_t num_suppvec, int32_t* IDX,
620 int32_t idx,
float64_t weight, int32_t tree_num);
641 char* avec, int32_t alen,
char* bvec, int32_t blen);
652 char* avec, int32_t alen,
char* bvec, int32_t blen);
663 char* avec, int32_t alen,
char* bvec, int32_t blen);
676 char* avec,
float64_t *posweights_lhs, int32_t alen,
677 char* bvec,
float64_t *posweights_rhs, int32_t blen);
732 int32_t max_mismatch;