The Exponential Kernel, closely related to the Gaussian Kernel computed on CDotFeatures.
It is computed as
where is the kernel width.
Definition at line 37 of file ExponentialKernel.h.
Public Member Functions | |
CExponentialKernel () | |
CExponentialKernel (CDotFeatures *l, CDotFeatures *r, float64_t width, CDistance *distance, int32_t size) | |
virtual | ~CExponentialKernel () |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual void | cleanup () |
virtual EKernelType | get_kernel_type () |
virtual const char * | get_name () const |
virtual float64_t | get_width (void) const |
Protected Member Functions | |
virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
virtual void | load_serializable_post (void) throw (ShogunException) |
Protected Attributes | |
CDistance * | m_distance |
float64_t | m_width |
default constructor
Definition at line 22 of file ExponentialKernel.cpp.
CExponentialKernel | ( | CDotFeatures * | l, | |
CDotFeatures * | r, | |||
float64_t | width, | |||
CDistance * | distance, | |||
int32_t | size | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side | |
width | width | |
distance | distance to be used | |
size | cache size |
Definition at line 28 of file ExponentialKernel.cpp.
~CExponentialKernel | ( | ) | [virtual] |
destructor
Definition at line 38 of file ExponentialKernel.cpp.
void cleanup | ( | ) | [virtual] |
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 |
Reimplemented from CDotKernel.
Definition at line 57 of file ExponentialKernel.cpp.
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CDotKernel.
Definition at line 74 of file ExponentialKernel.h.
virtual const char* get_name | ( | void | ) | const [virtual] |
return the kernel's name
Reimplemented from CDotKernel.
Definition at line 80 of file ExponentialKernel.h.
virtual float64_t get_width | ( | void | ) | const [virtual] |
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CDotKernel.
Definition at line 49 of file ExponentialKernel.cpp.
void load_serializable_post | ( | void | ) | throw (ShogunException) [protected, virtual] |
Can (optionally) be overridden to post-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::LOAD_SERIALIZABLE_POST is called.
ShogunException | Will be thrown if an error occurres. |
Reimplemented from CKernel.
Definition at line 64 of file ExponentialKernel.cpp.
CDistance* m_distance [protected] |
distance
Definition at line 117 of file ExponentialKernel.h.
width
Definition at line 119 of file ExponentialKernel.h.