Public Member Functions | Protected Member Functions | Protected Attributes

CTensorProductPairKernel Class Reference

Detailed Description

Computes the Tensor Product Pair Kernel (TPPK).

Formally, it computes

\[ k_{\mbox{tppk}}(({\bf a},{\bf b}), ({\bf c},{\bf d}))= k({\bf a}, {\bf c})\cdot k({\bf b}, {\bf c}) + k({\bf a},{\bf d})\cdot k({\bf b}, {\bf c}) \]

It is defined on pairs of inputs and a subkernel $k$. The subkernel has to be given on initialization. The pairs are specified via indizes (ab)using 2-dimensional integer features.

Its feature space $\Phi_{\mbox{tppk}}$ is the tensor product of the feature spaces of the subkernel $k(.,.)$ on its input.

It is often used in bioinformatics, e.g., to predict protein-protein interactions.

Definition at line 37 of file TensorProductPairKernel.h.

Inheritance diagram for CTensorProductPairKernel:
Inheritance graph

List of all members.

Public Member Functions

 CTensorProductPairKernel ()
 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 void register_params ()
virtual const char * get_name () const
virtual EFeatureClass get_feature_class ()
virtual EFeatureType get_feature_type ()

Protected Member Functions

virtual float64_t compute (int32_t idx_a, int32_t idx_b)

Protected Attributes


Constructor & Destructor Documentation

default constructor

Definition at line 19 of file TensorProductPairKernel.cpp.

CTensorProductPairKernel ( int32_t  size,
CKernel subkernel 


size cache size
subkernel the subkernel

Definition at line 25 of file TensorProductPairKernel.cpp.

CTensorProductPairKernel ( CSimpleFeatures< int32_t > *  l,
CSimpleFeatures< int32_t > *  r,
CKernel subkernel 


l features of left-hand side
r features of right-hand side
subkernel the subkernel

Definition at line 32 of file TensorProductPairKernel.cpp.

~CTensorProductPairKernel (  )  [virtual]

Definition at line 40 of file TensorProductPairKernel.cpp.

Member Function Documentation

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
computed kernel function at indices a,b

Reimplemented from CDotKernel.

Definition at line 53 of file TensorProductPairKernel.cpp.

virtual EFeatureClass get_feature_class (  )  [virtual]

return feature class the kernel can deal with

feature class SIMPLE

Reimplemented from CDotKernel.

Definition at line 88 of file TensorProductPairKernel.h.

virtual EFeatureType get_feature_type (  )  [virtual]

return feature type the kernel can deal with

int32_t feature type

Reimplemented from CDotKernel.

Definition at line 94 of file TensorProductPairKernel.h.

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

kernel type TPPK

Implements CDotKernel.

Definition at line 72 of file TensorProductPairKernel.h.

virtual const char* get_name (  )  const [virtual]

return the kernel's name

name TPPK

Reimplemented from CDotKernel.

Definition at line 82 of file TensorProductPairKernel.h.

bool init ( CFeatures l,
CFeatures r 
) [virtual]

initialize kernel

l features of left-hand side
r features of right-hand side
if initializing was successful

Reimplemented from CDotKernel.

Definition at line 46 of file TensorProductPairKernel.cpp.

void register_params (  )  [virtual]

Separate the function of parameter registration This can be the first stage of a *general* framework for cross-validation or other parameter-based operations

Reimplemented from CKernel.

Definition at line 80 of file TensorProductPairKernel.cpp.

Member Data Documentation

CKernel* subkernel [protected]

the subkernel

Definition at line 109 of file TensorProductPairKernel.h.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation