Computes the Tensor Product Pair Kernel (TPPK).
Formally, it computes
It is defined on pairs of inputs and a subkernel . The subkernel has to be given on initialization. The pairs are specified via indizes (ab)using 2-dimensional integer features.
Its feature space is the tensor product of the feature spaces of the subkernel
on its input.
It is often used in bioinformatics, e.g., to predict protein-protein interactions.
Definition at line 37 of file TensorProductPairKernel.h.
Public Member Functions | |
CTensorProductPairKernel (int32_t size, CKernel *subkernel) | |
CTensorProductPairKernel (CSimpleFeatures< int32_t > *l, CSimpleFeatures< int32_t > *r, CKernel *subkernel) | |
virtual | ~CTensorProductPairKernel () |
virtual bool | init (CFeatures *l, CFeatures *r) |
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 | |
CKernel * | subkernel |
CTensorProductPairKernel | ( | int32_t | size, | |
CKernel * | subkernel | |||
) |
constructor
size | cache size | |
subkernel | the subkernel |
Definition at line 19 of file TensorProductPairKernel.cpp.
CTensorProductPairKernel | ( | CSimpleFeatures< int32_t > * | l, | |
CSimpleFeatures< int32_t > * | r, | |||
CKernel * | subkernel | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side | |
subkernel | the subkernel |
Definition at line 25 of file TensorProductPairKernel.cpp.
~CTensorProductPairKernel | ( | ) | [virtual] |
Definition at line 32 of file TensorProductPairKernel.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 |
Implements CKernel.
Definition at line 45 of file TensorProductPairKernel.cpp.
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CKernel.
Definition at line 69 of file TensorProductPairKernel.h.
virtual const char* get_name | ( | ) | const [virtual] |
return the kernel's name
Implements CSGObject.
Definition at line 75 of file TensorProductPairKernel.h.
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CSimpleKernel< int32_t >.
Definition at line 38 of file TensorProductPairKernel.cpp.
the subkernel
Definition at line 90 of file TensorProductPairKernel.h.