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.
在文件GaussianShiftKernel.h第36行定义。
公有成员 | |
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 |
保护成员 | |
virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
保护属性 | |
int32_t | max_shift |
int32_t | shift_step |
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 |
在文件GaussianShiftKernel.cpp第19行定义。
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 |
在文件GaussianShiftKernel.cpp第25行定义。
~CGaussianShiftKernel | ( | ) | [virtual] |
在文件GaussianShiftKernel.cpp第33行定义。
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 |
在文件GaussianShiftKernel.cpp第37行定义。
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
virtual const char* get_name | ( | ) | const [virtual] |
int32_t max_shift [protected] |
maximum shift
在文件GaussianShiftKernel.h第91行定义。
int32_t shift_step [protected] |
shift step
在文件GaussianShiftKernel.h第93行定义。