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
[legend]

List of all members.

Public Member Functions

 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

CPluginEstimateestimate
float64_tmean
float64_tvariance
float64_tsqrtdiag_lhs
float64_tsqrtdiag_rhs
float64_tld_mean_lhs
float64_tld_mean_rhs
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

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

constructor

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

Definition at line 21 of file SalzbergWordStringKernel.cpp.

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

constructor

Parameters:
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 32 of file SalzbergWordStringKernel.cpp.

~CSalzbergWordStringKernel (  )  [virtual]

Definition at line 47 of file SalzbergWordStringKernel.cpp.


Member Function Documentation

void cleanup (  )  [virtual]

clean up kernel

Reimplemented from CKernel.

Definition at line 288 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

Parameters:
idx_a index a
idx_b index b
Returns:
computed kernel function at indices a,b

Implements CKernel.

Definition at line 313 of file SalzbergWordStringKernel.cpp.

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

compute index of given symbol at given position

Parameters:
position position
symbol symbol
Returns:
index

Definition at line 113 of file SalzbergWordStringKernel.h.

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

Returns:
kernel type SALZBERG

Implements CKernel.

Definition at line 87 of file SalzbergWordStringKernel.h.

virtual const char* get_name (  )  const [virtual]

return the kernel's name

Returns:
name Salzberg

Implements CSGObject.

Definition at line 93 of file SalzbergWordStringKernel.h.

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

initialize kernel

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

Reimplemented from CStringKernel< uint16_t >.

Definition at line 52 of file SalzbergWordStringKernel.cpp.

void set_prior_probs ( float64_t  pos_prior_,
float64_t  neg_prior_ 
)

set prior probs

Parameters:
pos_prior_ positive prior
neg_prior_ negative prior

Definition at line 58 of file SalzbergWordStringKernel.h.

void set_prior_probs_from_labels ( CLabels labels  ) 

set prior probs from labels

Parameters:
labels labels to set prior probabilites from

Definition at line 348 of file SalzbergWordStringKernel.cpp.


Member Data Documentation

CPluginEstimate* estimate [protected]

the plugin estimate

Definition at line 120 of file SalzbergWordStringKernel.h.

bool initialized [protected]

if kernel is initialized

Definition at line 148 of file SalzbergWordStringKernel.h.

float64_t* ld_mean_lhs [protected]

ld mean left-hand side

Definition at line 133 of file SalzbergWordStringKernel.h.

float64_t* ld_mean_rhs [protected]

ld mean right-hand side

Definition at line 135 of file SalzbergWordStringKernel.h.

float64_t* mean [protected]

mean

Definition at line 123 of file SalzbergWordStringKernel.h.

float64_t neg_prior [protected]

negative prior

Definition at line 146 of file SalzbergWordStringKernel.h.

int32_t num_params [protected]

number of params

Definition at line 138 of file SalzbergWordStringKernel.h.

int32_t num_symbols [protected]

number of symbols

Definition at line 140 of file SalzbergWordStringKernel.h.

float64_t pos_prior [protected]

positive prior

Definition at line 144 of file SalzbergWordStringKernel.h.

float64_t* sqrtdiag_lhs [protected]

sqrt diagonal of left-hand side

Definition at line 128 of file SalzbergWordStringKernel.h.

float64_t* sqrtdiag_rhs [protected]

sqrt diagonal of right-hand side

Definition at line 130 of file SalzbergWordStringKernel.h.

float64_t sum_m2_s2 [protected]

sum m2 s2

Definition at line 142 of file SalzbergWordStringKernel.h.

float64_t* variance [protected]

variance

Definition at line 125 of file SalzbergWordStringKernel.h.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation