Public Member Functions | |
CMatchWordStringKernel (int32_t size, int32_t d) | |
CMatchWordStringKernel (CStringFeatures< uint16_t > *l, CStringFeatures< uint16_t > *r, int32_t degree) | |
virtual | ~CMatchWordStringKernel () |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual bool | load_init (FILE *src) |
virtual bool | save_init (FILE *dest) |
virtual EKernelType | get_kernel_type () |
virtual const char * | get_name () |
Protected Member Functions | |
virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
Protected Attributes | |
int32_t | degree |
where I is the indicator function which evaluates to 1 if its argument is true and to 0 otherwise.
Note that additional normalisation is applied, i.e.
Definition at line 32 of file MatchWordStringKernel.h.
CMatchWordStringKernel::CMatchWordStringKernel | ( | int32_t | size, | |
int32_t | d | |||
) |
constructor
size | cache size | |
d | degree |
Definition at line 18 of file MatchWordStringKernel.cpp.
CMatchWordStringKernel::CMatchWordStringKernel | ( | CStringFeatures< uint16_t > * | l, | |
CStringFeatures< uint16_t > * | r, | |||
int32_t | degree | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side | |
degree | degree |
Definition at line 24 of file MatchWordStringKernel.cpp.
CMatchWordStringKernel::~CMatchWordStringKernel | ( | ) | [virtual] |
Definition at line 31 of file MatchWordStringKernel.cpp.
float64_t CMatchWordStringKernel::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 |
Implements CKernel.
Definition at line 52 of file MatchWordStringKernel.cpp.
virtual EKernelType CMatchWordStringKernel::get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CKernel.
Definition at line 78 of file MatchWordStringKernel.h.
virtual const char* CMatchWordStringKernel::get_name | ( | ) | [virtual] |
return the kernel's name
Implements CKernel.
Definition at line 84 of file MatchWordStringKernel.h.
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CStringKernel< uint16_t >.
Definition at line 36 of file MatchWordStringKernel.cpp.
bool CMatchWordStringKernel::load_init | ( | FILE * | src | ) | [virtual] |
load kernel init_data
src | file to load from |
Implements CKernel.
Definition at line 42 of file MatchWordStringKernel.cpp.
bool CMatchWordStringKernel::save_init | ( | FILE * | dest | ) | [virtual] |
save kernel init_data
dest | file to save to |
Implements CKernel.
Definition at line 47 of file MatchWordStringKernel.cpp.
int32_t CMatchWordStringKernel::degree [protected] |
degree
Definition at line 99 of file MatchWordStringKernel.h.