71 SG_DEBUG(
"init: lhs: %ld rhs: %ld\n", l, r)
136 SG_ERROR(
"number of parameters of estimate and feature representation do not match\n")
155 for (i=0; i<num_vectors; i++)
163 for (int32_t j=0; j<len; j++)
174 for (i=0; i<num_vectors; i++)
182 for (int32_t j=0; j<len; j++)
184 for (int32_t k=0; k<4; k++)
195 -
mean[idx])/num_vectors;
228 for (int32_t j=0; j<alen; j++)
234 ld_mean_lhs[i]=result ;
253 for (int32_t j=0; j<alen; j++)
271 plo_lhs = l_plo_lhs ;
273 ld_mean_lhs = l_ld_mean_lhs ;
292 plo_lhs = l_plo_rhs ;
294 ld_mean_lhs = l_ld_mean_rhs ;
310 plo_lhs = l_plo_lhs ;
312 ld_mean_lhs = l_ld_mean_lhs ;
360 bool free_avec, free_bvec;
369 for (int32_t i=0; i<alen; i++)
371 if (avec[i]==bvec[i])
385 #ifdef DEBUG_HWSK_COMPUTATION
386 float64_t result2 = compute_slow(idx_a, idx_b) ;
387 if (fabs(result - result2)>1e-10)
388 SG_ERROR(
"new=%e old = %e diff = %e\n", result, result2, result - result2)
395 void CHistogramWordStringKernel::init()
431 #ifdef DEBUG_HWSK_COMPUTATION
432 float64_t CHistogramWordStringKernel::compute_slow(int32_t idx_a, int32_t idx_b)
435 bool free_avec, free_bvec;
445 for (int32_t i=0; i<alen; i++)
450 if (avec[i]==bvec[i])
453 result += dd*dd/variance[a_idx] ;
SGVector< ST > get_feature_vector(int32_t num)
CPluginEstimate * estimate
float64_t log_derivative_neg_obsolete(uint16_t obs, int32_t pos)
int32_t num_rhs
number of feature vectors on right hand side
virtual int32_t get_num_vectors() const
void free_feature_vector(ST *feat_vec, int32_t num, bool dofree)
floatmax_t get_num_symbols()
Class SGObject is the base class of all shogun objects.
float64_t log_derivative_pos_obsolete(uint16_t obs, int32_t pos)
virtual bool init(CFeatures *l, CFeatures *r)
int32_t num_lhs
number of feature vectors on left hand side
float64_t posterior_log_odds_obsolete(uint16_t *vector, int32_t len)
virtual bool init_normalizer()
virtual ~CHistogramWordStringKernel()
CFeatures * rhs
feature vectors to occur on right hand side
void add_vector(bool **param, index_t *length, const char *name, const char *description="")
all of classes and functions are contained in the shogun namespace
CFeatures * lhs
feature vectors to occur on left hand side
The class Features is the base class of all feature objects.
CHistogramWordStringKernel()
float64_t compute(int32_t idx_a, int32_t idx_b)
int32_t compute_index(int32_t position, uint16_t symbol)
Template class StringKernel, is the base class of all String Kernels.
virtual int32_t get_vector_length(int32_t vec_num)