Public Member Functions | Protected Member Functions | Protected Attributes

CSalzbergWordStringKernel Class Reference

Detailed Description

The SalzbergWordString kernel implements the Salzberg kernel.

It is described in

Engineering Support Vector Machine Kernels That Recognize Translation Initiation Sites A. Zien, G.Raetsch, S. Mika, B. Schoelkopf, T. Lengauer, K.-R. Mueller

Definition at line 29 of file SalzbergWordStringKernel.h.

Inheritance diagram for CSalzbergWordStringKernel:
Inheritance graph

List of all members.

Public Member Functions

 CSalzbergWordStringKernel ()
 CSalzbergWordStringKernel (int32_t size, CPluginEstimate *pie, CLabels *labels=NULL)
 CSalzbergWordStringKernel (CStringFeatures< uint16_t > *l, CStringFeatures< uint16_t > *r, CPluginEstimate *pie, CLabels *labels=NULL)
virtual ~CSalzbergWordStringKernel ()
void set_prior_probs (float64_t pos_prior_, float64_t neg_prior_)
void set_prior_probs_from_labels (CLabels *labels)
virtual bool init (CFeatures *l, CFeatures *r)
virtual void cleanup ()
virtual EKernelType get_kernel_type ()
virtual const char * get_name () const

Protected Member Functions

float64_t compute (int32_t idx_a, int32_t idx_b)
int32_t compute_index (int32_t position, uint16_t symbol)

Protected Attributes

int32_t num_params
int32_t num_symbols
float64_t sum_m2_s2
float64_t pos_prior
float64_t neg_prior
bool initialized

Constructor & Destructor Documentation

default constructor

Definition at line 21 of file SalzbergWordStringKernel.cpp.

CSalzbergWordStringKernel ( int32_t  size,
CPluginEstimate pie,
CLabels labels = NULL 


size cache size
pie the plugin estimate
labels optional labels to set prior from

Definition at line 27 of file SalzbergWordStringKernel.cpp.

CSalzbergWordStringKernel ( CStringFeatures< uint16_t > *  l,
CStringFeatures< uint16_t > *  r,
CPluginEstimate pie,
CLabels labels = NULL 


l features of left-hand side
r features of right-hand side
pie the plugin estimate
labels optional labels to set prior from

Definition at line 37 of file SalzbergWordStringKernel.cpp.

~CSalzbergWordStringKernel (  )  [virtual]

Definition at line 51 of file SalzbergWordStringKernel.cpp.

Member Function Documentation

void cleanup (  )  [virtual]

clean up kernel

Reimplemented from CKernel.

Definition at line 292 of file SalzbergWordStringKernel.cpp.

float64_t compute ( int32_t  idx_a,
int32_t  idx_b 
) [protected, virtual]

compute kernel function for features a and b idx_{a,b} denote the index of the feature vectors in the corresponding feature object

idx_a index a
idx_b index b
computed kernel function at indices a,b

Implements CKernel.

Definition at line 317 of file SalzbergWordStringKernel.cpp.

int32_t compute_index ( int32_t  position,
uint16_t  symbol 
) [protected]

compute index of given symbol at given position

position position
symbol symbol

Definition at line 116 of file SalzbergWordStringKernel.h.

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

kernel type SALZBERG

Implements CStringKernel< uint16_t >.

Definition at line 90 of file SalzbergWordStringKernel.h.

virtual const char* get_name (  )  const [virtual]

return the kernel's name

name Salzberg

Reimplemented from CStringKernel< uint16_t >.

Definition at line 96 of file SalzbergWordStringKernel.h.

bool init ( CFeatures l,
CFeatures r 
) [virtual]

initialize kernel

l features of left-hand side
r features of right-hand side
if initializing was successful

Reimplemented from CStringKernel< uint16_t >.

Definition at line 56 of file SalzbergWordStringKernel.cpp.

void set_prior_probs ( float64_t  pos_prior_,
float64_t  neg_prior_ 

set prior probs

pos_prior_ positive prior
neg_prior_ negative prior

Definition at line 61 of file SalzbergWordStringKernel.h.

void set_prior_probs_from_labels ( CLabels labels  ) 

set prior probs from labels

labels labels to set prior probabilites from

Definition at line 352 of file SalzbergWordStringKernel.cpp.

Member Data Documentation

CPluginEstimate* estimate [protected]

the plugin estimate

Definition at line 125 of file SalzbergWordStringKernel.h.

bool initialized [protected]

if kernel is initialized

Definition at line 153 of file SalzbergWordStringKernel.h.

float64_t* ld_mean_lhs [protected]

ld mean left-hand side

Definition at line 138 of file SalzbergWordStringKernel.h.

float64_t* ld_mean_rhs [protected]

ld mean right-hand side

Definition at line 140 of file SalzbergWordStringKernel.h.

float64_t* mean [protected]


Definition at line 128 of file SalzbergWordStringKernel.h.

float64_t neg_prior [protected]

negative prior

Definition at line 151 of file SalzbergWordStringKernel.h.

int32_t num_params [protected]

number of params

Definition at line 143 of file SalzbergWordStringKernel.h.

int32_t num_symbols [protected]

number of symbols

Definition at line 145 of file SalzbergWordStringKernel.h.

float64_t pos_prior [protected]

positive prior

Definition at line 149 of file SalzbergWordStringKernel.h.

float64_t* sqrtdiag_lhs [protected]

sqrt diagonal of left-hand side

Definition at line 133 of file SalzbergWordStringKernel.h.

float64_t* sqrtdiag_rhs [protected]

sqrt diagonal of right-hand side

Definition at line 135 of file SalzbergWordStringKernel.h.

float64_t sum_m2_s2 [protected]

sum m2 s2

Definition at line 147 of file SalzbergWordStringKernel.h.

float64_t* variance [protected]


Definition at line 130 of file SalzbergWordStringKernel.h.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation