An experimental kernel inspired by the WeightedDegreePositionStringKernel and the Gaussian kernel.
It is computed as
where is the kernel width. The idea is to shift the dimensions of the input vectors against eachother.
is the step size (parameter shift_step) of the shifts and
(parameter max_shift) is the maximal shift.
Definition at line 37 of file GaussianShiftKernel.h.
Public Member Functions | |
CGaussianShiftKernel () | |
CGaussianShiftKernel (int32_t size, float64_t width, int32_t max_shift, int32_t shift_step) | |
CGaussianShiftKernel (CSimpleFeatures< float64_t > *l, CSimpleFeatures< float64_t > *r, float64_t width, int32_t max_shift, int32_t shift_step, int32_t size=10) | |
virtual | ~CGaussianShiftKernel () |
virtual EKernelType | get_kernel_type () |
virtual const char * | get_name () const |
Protected Member Functions | |
virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
Protected Attributes | |
int32_t | max_shift |
int32_t | shift_step |
CGaussianShiftKernel | ( | void | ) |
default constructor
Definition at line 19 of file GaussianShiftKernel.cpp.
CGaussianShiftKernel | ( | int32_t | size, | |
float64_t | width, | |||
int32_t | max_shift, | |||
int32_t | shift_step | |||
) |
constructor
size | cache size | |
width | width | |
max_shift | maximum shift | |
shift_step | shift step |
Definition at line 25 of file GaussianShiftKernel.cpp.
CGaussianShiftKernel | ( | CSimpleFeatures< float64_t > * | l, | |
CSimpleFeatures< float64_t > * | r, | |||
float64_t | width, | |||
int32_t | max_shift, | |||
int32_t | shift_step, | |||
int32_t | size = 10 | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side | |
width | width | |
max_shift | maximum shift | |
shift_step | shift step | |
size | cache size |
Definition at line 32 of file GaussianShiftKernel.cpp.
~CGaussianShiftKernel | ( | ) | [virtual] |
Definition at line 41 of file GaussianShiftKernel.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 |
Reimplemented from CGaussianKernel.
Definition at line 45 of file GaussianShiftKernel.cpp.
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Reimplemented from CGaussianKernel.
Definition at line 74 of file GaussianShiftKernel.h.
virtual const char* get_name | ( | void | ) | const [virtual] |
return the kernel's name
Reimplemented from CGaussianKernel.
Definition at line 80 of file GaussianShiftKernel.h.
int32_t max_shift [protected] |
maximum shift
Definition at line 98 of file GaussianShiftKernel.h.
int32_t shift_step [protected] |
shift step
Definition at line 100 of file GaussianShiftKernel.h.