Public Member Functions | |
CSparsePolyKernel (CSparseFeatures< float64_t > *l, CSparseFeatures< float64_t > *r, int32_t size, int32_t d, bool inhom) | |
CSparsePolyKernel (int32_t size, int32_t degree, bool inhomogene=true) | |
virtual | ~CSparsePolyKernel () |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual void | cleanup () |
virtual bool | load_init (FILE *src) |
virtual bool | save_init (FILE *dest) |
virtual EFeatureType | get_feature_type () |
virtual EKernelType | get_kernel_type () |
virtual const char * | get_name () |
Protected Member Functions | |
virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
Protected Attributes | |
int32_t | degree |
bool | inhomogene |
Note that additional normalisation is applied, i.e.
Definition at line 28 of file SparsePolyKernel.h.
CSparsePolyKernel::CSparsePolyKernel | ( | CSparseFeatures< float64_t > * | l, | |
CSparseFeatures< float64_t > * | r, | |||
int32_t | size, | |||
int32_t | d, | |||
bool | inhom | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side | |
size | cache size | |
d | degree | |
inhom | is inhomogeneous |
Definition at line 23 of file SparsePolyKernel.cpp.
CSparsePolyKernel::CSparsePolyKernel | ( | int32_t | size, | |
int32_t | degree, | |||
bool | inhomogene = true | |||
) |
constructor
size | cache size | |
degree | degree | |
inhomogene | is inhomogeneous |
Definition at line 17 of file SparsePolyKernel.cpp.
CSparsePolyKernel::~CSparsePolyKernel | ( | ) | [virtual] |
Definition at line 32 of file SparsePolyKernel.cpp.
void CSparsePolyKernel::cleanup | ( | ) | [virtual] |
float64_t CSparsePolyKernel::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 58 of file SparsePolyKernel.cpp.
virtual EFeatureType CSparsePolyKernel::get_feature_type | ( | ) | [virtual] |
return feature type the kernel can deal with
Reimplemented from CSparseKernel< float64_t >.
Definition at line 82 of file SparsePolyKernel.h.
virtual EKernelType CSparsePolyKernel::get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CKernel.
Definition at line 88 of file SparsePolyKernel.h.
virtual const char* CSparsePolyKernel::get_name | ( | ) | [virtual] |
return the kernel's name
Implements CKernel.
Definition at line 94 of file SparsePolyKernel.h.
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CSparseKernel< float64_t >.
Definition at line 37 of file SparsePolyKernel.cpp.
bool CSparsePolyKernel::load_init | ( | FILE * | src | ) | [virtual] |
load kernel init_data
src | file to load from |
Implements CKernel.
Definition at line 48 of file SparsePolyKernel.cpp.
bool CSparsePolyKernel::save_init | ( | FILE * | dest | ) | [virtual] |
save kernel init_data
dest | file to save to |
Implements CKernel.
Definition at line 53 of file SparsePolyKernel.cpp.
int32_t CSparsePolyKernel::degree [protected] |
degree
Definition at line 109 of file SparsePolyKernel.h.
bool CSparsePolyKernel::inhomogene [protected] |
if kernel is inhomogeneous
Definition at line 111 of file SparsePolyKernel.h.