12 #ifndef _WEIGHTEDDEGREEPOSITIONSTRINGKERNEL_H___
13 #define _WEIGHTEDDEGREEPOSITIONSTRINGKERNEL_H___
62 int32_t size, int32_t
degree,
112 virtual const char*
get_name()
const {
return "WeightedDegreePositionStringKernel"; }
122 int32_t p_count, int32_t *IDX,
float64_t * alphas)
139 int32_t count, int32_t *IDX,
float64_t * alphas, int32_t tree_num,
140 int32_t upto_tree=-1);
178 int32_t num_vec, int32_t* vec_idx,
float64_t* target,
179 int32_t num_suppvec, int32_t* IDX,
float64_t* alphas,
190 SG_DEBUG(
"disabling compact trie nodes with FASTBUTMEMHUNGRY\n") ;
200 SG_ERROR(
"unknown optimization type\n");
236 int32_t idx,
float64_t * subkernel_contrib)
244 SG_ERROR(
"CWeightedDegreePositionStringKernel optimization not initialized\n") ;
260 for (int32_t i=0; i<num_weights; i++)
263 for (int32_t i=0; i<num_weights; i++)
276 int32_t num_weights2=w.
vlen;
279 if (num_weights!=num_weights2)
280 SG_ERROR(
"number of weights do not match\n") ;
283 for (int32_t i=0; i<num_weights; i++)
291 for (int32_t i=0; i<num_weights; i++)
294 weights[i*mkl_stepsize+j] = weights2[i] ;
298 for (int32_t i=0; i<num_weights; i++)
301 weights[i*mkl_stepsize+j] = weights2[i] ;
358 num_weights = degree*
length ;
530 int32_t max_degree, int32_t& num_feat, int32_t& num_sym,
531 float64_t* target, int32_t num_suppvec, int32_t* IDX,
543 int32_t &num_feat, int32_t num_suppvec, int32_t* IDX,
558 int32_t max_degree, int32_t& num_feat, int32_t& num_sym,
559 float64_t* w_result, int32_t num_suppvec, int32_t* IDX,
575 int32_t max_degree, int32_t& num_feat, int32_t& num_sym,
576 float64_t* poim_result, int32_t num_suppvec, int32_t* IDX,
621 int32_t idx,
float64_t weight, int32_t tree_num);
642 char* avec, int32_t alen,
char* bvec, int32_t blen);
653 char* avec, int32_t alen,
char* bvec, int32_t blen);
664 char* avec, int32_t alen,
char* bvec, int32_t blen);
677 char* avec,
float64_t *posweights_lhs, int32_t alen,
678 char* bvec,
float64_t *posweights_rhs, int32_t blen);
733 int32_t max_mismatch;