118 SG_ERROR(
"number of parameters of estimate and feature representation do not match\n")
137 for (i=0; i<num_vectors; i++)
143 for (int32_t j=0; j<len; j++)
150 mean[idx] += value/num_vectors ;
156 for (i=0; i<num_vectors; i++)
162 for (int32_t j=0; j<len; j++)
164 for (int32_t k=0; k<4; k++)
204 for (int32_t j=0; j<alen; j++)
214 ld_mean_lhs[i]=result ;
230 for (int32_t j=0; j<alen; j++)
251 ld_mean_lhs = l_ld_mean_lhs ;
270 ld_mean_lhs = l_ld_mean_rhs ;
286 ld_mean_lhs = l_ld_mean_lhs ;
321 bool free_avec, free_bvec;
329 for (int32_t i=0; i<alen; i++)
331 if (avec[i]==bvec[i])
339 result += value*value/
variance[a_idx] ;
359 int32_t num_pos=0, num_neg=0;
368 SG_INFO(
"priors: pos=%1.3f (%i) neg=%1.3f (%i)\n",
369 (
float64_t) num_pos/(num_pos+num_neg), num_pos,
370 (
float64_t) num_neg/(num_pos+num_neg), num_neg);
377 void CSalzbergWordStringKernel::init()
CPluginEstimate * estimate
SGVector< ST > get_feature_vector(int32_t num)
virtual ELabelType get_label_type() const =0
float64_t log_derivative_neg_obsolete(uint16_t obs, int32_t pos)
The class Labels models labels, i.e. class assignments of objects.
virtual int32_t get_num_labels() const =0
virtual int32_t get_num_vectors() const
CSalzbergWordStringKernel()
int32_t compute_index(int32_t position, uint16_t symbol)
virtual int32_t get_num_vectors() const =0
void free_feature_vector(ST *feat_vec, int32_t num, bool dofree)
virtual ~CSalzbergWordStringKernel()
float64_t compute(int32_t idx_a, int32_t idx_b)
floatmax_t get_num_symbols()
float64_t log_derivative_pos_obsolete(uint16_t obs, int32_t pos)
void set_prior_probs_from_labels(CLabels *labels)
virtual bool init_normalizer()
virtual bool init(CFeatures *l, CFeatures *r)
CFeatures * rhs
feature vectors to occur on right hand side
all of classes and functions are contained in the shogun namespace
void set_prior_probs(float64_t pos_prior_, float64_t neg_prior_)
CFeatures * lhs
feature vectors to occur on left hand side
The class Features is the base class of all feature objects.
Binary Labels for binary classification.
virtual void ensure_valid(const char *context=NULL)=0
Template class StringKernel, is the base class of all String Kernels.
virtual int32_t get_vector_length(int32_t vec_num)