Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends

CKernel Class Reference


Detailed Description

The Kernel base class.

Non-mathematically spoken, a kernel is a function that given two input objects ${\bf x}$ and ${\bf x'}$ returns a score describing the similarity of the vectors. The score should be larger when the objects are more similar.

It can be defined as

\[ k({\bf x},{\bf x'})= \Phi_k({\bf x})\cdot \Phi_k({\bf x'}) \]

where $\Phi$ maps the objects into some potentially high dimensional feature space.

Apart from the input features, the base kernel takes only one argument (the size of the kernel cache) that is used to efficiently train kernel-machines like e.g. SVMs.

In case you would like to define your own kernel, you only have to define a new compute() function (and the kernel name via get_name() and the kernel type get_kernel_type()). A good example to look at is the GaussianKernel.

Definition at line 175 of file Kernel.h.

Inheritance diagram for CKernel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CKernel ()
 CKernel (int32_t size)
 CKernel (CFeatures *l, CFeatures *r, int32_t size)
virtual ~CKernel ()
float64_t kernel (int32_t idx_a, int32_t idx_b)
SGMatrix< float64_tget_kernel_matrix ()
virtual SGVector< float64_tget_kernel_col (int32_t j)
virtual SGVector< float64_tget_kernel_row (int32_t i)
template<class T >
SGMatrix< T > get_kernel_matrix ()
virtual bool init (CFeatures *lhs, CFeatures *rhs)
virtual bool set_normalizer (CKernelNormalizer *normalizer)
virtual CKernelNormalizerget_normalizer ()
virtual bool init_normalizer ()
virtual void cleanup ()
void load (CFile *loader)
void save (CFile *writer)
CFeaturesget_lhs ()
CFeaturesget_rhs ()
virtual int32_t get_num_vec_lhs ()
virtual int32_t get_num_vec_rhs ()
virtual bool has_features ()
bool get_lhs_equals_rhs ()
virtual void remove_lhs_and_rhs ()
virtual void remove_lhs ()
virtual void remove_rhs ()
 takes all necessary steps if the rhs is removed from kernel
virtual EKernelType get_kernel_type ()=0
virtual EFeatureType get_feature_type ()=0
virtual EFeatureClass get_feature_class ()=0
void set_cache_size (int32_t size)
int32_t get_cache_size ()
void cache_reset ()
int32_t get_max_elems_cache ()
int32_t get_activenum_cache ()
void get_kernel_row (int32_t docnum, int32_t *active2dnum, float64_t *buffer, bool full_line=false)
void cache_kernel_row (int32_t x)
void cache_multiple_kernel_rows (int32_t *key, int32_t varnum)
void kernel_cache_reset_lru ()
void kernel_cache_shrink (int32_t totdoc, int32_t num_shrink, int32_t *after)
void resize_kernel_cache (KERNELCACHE_IDX size, bool regression_hack=false)
void set_time (int32_t t)
int32_t kernel_cache_touch (int32_t cacheidx)
int32_t kernel_cache_check (int32_t cacheidx)
int32_t kernel_cache_space_available ()
void kernel_cache_init (int32_t size, bool regression_hack=false)
void kernel_cache_cleanup ()
void list_kernel ()
bool has_property (EKernelProperty p)
virtual void clear_normal ()
virtual void add_to_normal (int32_t vector_idx, float64_t weight)
EOptimizationType get_optimization_type ()
virtual void set_optimization_type (EOptimizationType t)
bool get_is_initialized ()
virtual bool init_optimization (int32_t count, int32_t *IDX, float64_t *weights)
virtual bool delete_optimization ()
bool init_optimization_svm (CSVM *svm)
virtual float64_t compute_optimized (int32_t vector_idx)
virtual void compute_batch (int32_t num_vec, int32_t *vec_idx, float64_t *target, int32_t num_suppvec, int32_t *IDX, float64_t *alphas, float64_t factor=1.0)
float64_t get_combined_kernel_weight ()
void set_combined_kernel_weight (float64_t nw)
virtual int32_t get_num_subkernels ()
virtual void compute_by_subkernel (int32_t vector_idx, float64_t *subkernel_contrib)
virtual const float64_tget_subkernel_weights (int32_t &num_weights)
virtual void set_subkernel_weights (SGVector< float64_t > weights)

Protected Member Functions

void set_property (EKernelProperty p)
void unset_property (EKernelProperty p)
void set_is_initialized (bool p_init)
virtual float64_t compute (int32_t x, int32_t y)=0
int32_t compute_row_start (int64_t offs, int32_t n, bool symmetric)
virtual void load_serializable_post () throw (ShogunException)
virtual void save_serializable_pre () throw (ShogunException)
virtual void save_serializable_post () throw (ShogunException)
virtual void register_params ()

Static Protected Member Functions

template<class T >
static void * get_kernel_matrix_helper (void *p)

Protected Attributes

int32_t cache_size
 cache_size in MB
KERNEL_CACHE kernel_cache
 kernel cache
KERNELCACHE_ELEMkernel_matrix
CFeatureslhs
 feature vectors to occur on left hand side
CFeaturesrhs
 feature vectors to occur on right hand side
bool lhs_equals_rhs
 lhs
int32_t num_lhs
 number of feature vectors on left hand side
int32_t num_rhs
 number of feature vectors on right hand side
float64_t combined_kernel_weight
bool optimization_initialized
EOptimizationType opt_type
uint64_t properties
CKernelNormalizernormalizer

Friends

class CVarianceKernelNormalizer
class CSqrtDiagKernelNormalizer
class CAvgDiagKernelNormalizer
class CRidgeKernelNormalizer
class CFirstElementKernelNormalizer
class CMultitaskKernelNormalizer
class CMultitaskKernelMklNormalizer
class CMultitaskKernelMaskNormalizer
class CMultitaskKernelMaskPairNormalizer
class CTanimotoKernelNormalizer
class CDiceKernelNormalizer
class CZeroMeanCenterKernelNormalizer

Constructor & Destructor Documentation

CKernel (  ) 

default constructor

Definition at line 41 of file Kernel.cpp.

CKernel ( int32_t  size  ) 

constructor

Parameters:
size cache size

Definition at line 47 of file Kernel.cpp.

CKernel ( CFeatures l,
CFeatures r,
int32_t  size 
)

constructor

Parameters:
l features for left-hand side
r features for right-hand side
size cache size

Definition at line 59 of file Kernel.cpp.

~CKernel (  )  [virtual]

Definition at line 73 of file Kernel.cpp.


Member Function Documentation

void add_to_normal ( int32_t  vector_idx,
float64_t  weight 
) [virtual]

add vector*factor to 'virtual' normal vector

Parameters:
vector_idx index
weight weight

Reimplemented in CCombinedKernel, CCommUlongStringKernel, CCommWordStringKernel, CLinearKernel, CLinearStringKernel, CWeightedCommWordStringKernel, CWeightedDegreePositionStringKernel, and CWeightedDegreeStringKernel.

Definition at line 814 of file Kernel.cpp.

void cache_kernel_row ( int32_t  x  ) 

cache kernel row

Parameters:
x x

Definition at line 282 of file Kernel.cpp.

void cache_multiple_kernel_rows ( int32_t *  key,
int32_t  varnum 
)

cache multiple kernel rows

Parameters:
key key
varnum 

Definition at line 356 of file Kernel.cpp.

void cache_reset (  ) 

cache reset

Definition at line 526 of file Kernel.h.

void cleanup (  )  [virtual]
void clear_normal (  )  [virtual]

for optimizable kernels, i.e. kernels where the weight vector can be computed explicitly (if it fits into memory)

Reimplemented in CCombinedKernel, CCommUlongStringKernel, CCommWordStringKernel, CLinearKernel, CLinearStringKernel, CWeightedDegreePositionStringKernel, and CWeightedDegreeStringKernel.

Definition at line 819 of file Kernel.cpp.

virtual float64_t compute ( int32_t  x,
int32_t  y 
) [protected, pure virtual]
void compute_batch ( int32_t  num_vec,
int32_t *  vec_idx,
float64_t target,
int32_t  num_suppvec,
int32_t *  IDX,
float64_t alphas,
float64_t  factor = 1.0 
) [virtual]

computes output for a batch of examples in an optimized fashion (favorable if kernel supports it, i.e. has KP_BATCHEVALUATION. to the outputvector target (of length num_vec elements) the output for the examples enumerated in vec_idx are added. therefore make sure that it is initialized with ZERO. the following num_suppvec, IDX, alphas arguments are the number of support vectors, their indices and weights

Reimplemented in CCombinedKernel, CWeightedDegreePositionStringKernel, and CWeightedDegreeStringKernel.

Definition at line 807 of file Kernel.cpp.

void compute_by_subkernel ( int32_t  vector_idx,
float64_t subkernel_contrib 
) [virtual]

compute by subkernel

Parameters:
vector_idx index
subkernel_contrib subkernel contribution

Reimplemented in CCombinedKernel, CWeightedDegreePositionStringKernel, and CWeightedDegreeStringKernel.

Definition at line 829 of file Kernel.cpp.

float64_t compute_optimized ( int32_t  vector_idx  )  [virtual]

compute optimized

Parameters:
vector_idx index to compute
Returns:
optimized value at given index

Reimplemented in CCombinedKernel, CCommUlongStringKernel, CCommWordStringKernel, CLinearKernel, CLinearStringKernel, CWeightedCommWordStringKernel, CWeightedDegreePositionStringKernel, and CWeightedDegreeStringKernel.

Definition at line 801 of file Kernel.cpp.

int32_t compute_row_start ( int64_t  offs,
int32_t  n,
bool  symmetric 
) [protected]

compute row start offset for parallel kernel matrix computation

Parameters:
offs offset
n number of columns
symmetric whether matrix is symmetric

Definition at line 804 of file Kernel.h.

bool delete_optimization (  )  [virtual]

delete optimization

Returns:
if deleting was successful

Reimplemented in CCombinedKernel, CCommUlongStringKernel, CCommWordStringKernel, CLinearKernel, CLinearStringKernel, CWeightedDegreePositionStringKernel, and CWeightedDegreeStringKernel.

Definition at line 795 of file Kernel.cpp.

int32_t get_activenum_cache (  ) 

get activenum cache

Returns:
activecnum cache

Definition at line 538 of file Kernel.h.

int32_t get_cache_size (  ) 

return the size of the kernel cache

Returns:
size of kernel cache

Definition at line 522 of file Kernel.h.

float64_t get_combined_kernel_weight (  ) 

get combined kernel weight

Returns:
combined kernel weight

Definition at line 726 of file Kernel.h.

virtual EFeatureClass get_feature_class (  )  [pure virtual]
virtual EFeatureType get_feature_type (  )  [pure virtual]
bool get_is_initialized (  ) 

check if optimization is initialized

Returns:
if optimization is initialized

Definition at line 677 of file Kernel.h.

virtual SGVector<float64_t> get_kernel_col ( int32_t  j  )  [virtual]

get column j

Returns:
the jth column of the kernel matrix

Definition at line 246 of file Kernel.h.

SGMatrix<T> get_kernel_matrix (  ) 

get kernel matrix real

Returns:
the kernel matrix

Definition at line 278 of file Kernel.h.

SGMatrix<float64_t> get_kernel_matrix (  ) 

get kernel matrix

Returns:
computed kernel matrix (needs to be cleaned up)

Definition at line 236 of file Kernel.h.

static void* get_kernel_matrix_helper ( void *  p  )  [static, protected]

helper for computing the kernel matrix in a parallel way

Parameters:
p thread parameters

Definition at line 821 of file Kernel.h.

virtual SGVector<float64_t> get_kernel_row ( int32_t  i  )  [virtual]

get row i

Returns:
the ith row of the kernel matrix

Definition at line 263 of file Kernel.h.

void get_kernel_row ( int32_t  docnum,
int32_t *  active2dnum,
float64_t buffer,
bool  full_line = false 
)

get kernel row

Parameters:
docnum docnum
active2dnum active2dnum
buffer buffer
full_line full line

Definition at line 218 of file Kernel.cpp.

virtual EKernelType get_kernel_type (  )  [pure virtual]
CFeatures* get_lhs (  ) 

get left-hand side of features used in kernel

Returns:
features of left-hand side

Definition at line 428 of file Kernel.h.

bool get_lhs_equals_rhs (  ) 

test whether features on lhs and rhs are the same

Returns:
true if features are the same

Definition at line 467 of file Kernel.h.

int32_t get_max_elems_cache (  ) 

get maximum elements in cache

Returns:
maximum elements in cache

Definition at line 532 of file Kernel.h.

CKernelNormalizer * get_normalizer (  )  [virtual]

obtain the current kernel normalizer

Returns:
the kernel normalizer

Definition at line 142 of file Kernel.cpp.

int32_t get_num_subkernels (  )  [virtual]

get number of subkernels

Returns:
number of subkernels

Reimplemented in CCombinedKernel, CWeightedDegreePositionStringKernel, and CWeightedDegreeStringKernel.

Definition at line 824 of file Kernel.cpp.

virtual int32_t get_num_vec_lhs (  )  [virtual]

get number of vectors of lhs features

Returns:
number of vectors of left-hand side

Reimplemented in CCustomKernel.

Definition at line 440 of file Kernel.h.

virtual int32_t get_num_vec_rhs (  )  [virtual]

get number of vectors of rhs features

Returns:
number of vectors of right-hand side

Reimplemented in CCustomKernel.

Definition at line 449 of file Kernel.h.

EOptimizationType get_optimization_type (  ) 

get optimization type

Returns:
optimization type

Definition at line 665 of file Kernel.h.

CFeatures* get_rhs (  ) 

get right-hand side of features used in kernel

Returns:
features of right-hand side

Definition at line 434 of file Kernel.h.

const float64_t * get_subkernel_weights ( int32_t &  num_weights  )  [virtual]

get subkernel weights

Parameters:
num_weights number of weights will be stored here
Returns:
subkernel weights

Reimplemented in CCombinedKernel, CWeightedDegreePositionStringKernel, and CWeightedDegreeStringKernel.

Definition at line 835 of file Kernel.cpp.

virtual bool has_features (  )  [virtual]

test whether features have been assigned to lhs and rhs

Returns:
true if features are assigned

Reimplemented in CCombinedKernel, and CCustomKernel.

Definition at line 458 of file Kernel.h.

bool has_property ( EKernelProperty  p  ) 

check if kernel has given property

Parameters:
p kernel property
Returns:
if kernel has given property

Definition at line 647 of file Kernel.h.

bool init ( CFeatures lhs,
CFeatures rhs 
) [virtual]

initialize kernel e.g. setup lhs/rhs of kernel, precompute normalization constants etc. make sure to check that your kernel can deal with the supplied features (!)

Parameters:
lhs features for left-hand side
rhs features for right-hand side
Returns:
if init was successful

Reimplemented in CANOVAKernel, CAUCKernel, CBesselKernel, CCauchyKernel, CChi2Kernel, CCircularKernel, CCombinedKernel, CCommUlongStringKernel, CCommWordStringKernel, CConstKernel, CCustomKernel, CDiagKernel, CDistanceKernel, CDistantSegmentsKernel, CDotKernel, CExponentialKernel, CFixedDegreeStringKernel, CGaussianKernel, CGaussianMatchStringKernel, CGaussianShortRealKernel, CHistogramIntersectionKernel, CHistogramWordStringKernel, CInverseMultiQuadricKernel, CLinearKernel, CLinearStringKernel, CLocalAlignmentStringKernel, CLocalityImprovedStringKernel, CLogKernel, CMatchWordStringKernel, CMultiquadricKernel, COligoStringKernel, CPolyKernel, CPolyMatchStringKernel, CPolyMatchWordStringKernel, CPowerKernel, CPyramidChi2, CRationalQuadraticKernel, CRegulatoryModulesStringKernel, CSalzbergWordStringKernel, CSigmoidKernel, CSimpleLocalityImprovedStringKernel, CSNPStringKernel, CSparseKernel< ST >, CSparseSpatialSampleStringKernel, CSpectrumMismatchRBFKernel, CSpectrumRBFKernel, CSphericalKernel, CSplineKernel, CStringKernel< ST >, CTensorProductPairKernel, CTStudentKernel, CWaveKernel, CWaveletKernel, CWeightedCommWordStringKernel, CWeightedDegreePositionStringKernel, CWeightedDegreeRBFKernel, CWeightedDegreeStringKernel, CStringKernel< uint16_t >, CStringKernel< char >, and CStringKernel< uint64_t >.

Definition at line 98 of file Kernel.cpp.

bool init_normalizer (  )  [virtual]

initialize the current kernel normalizer

Returns:
if init was successful

Definition at line 148 of file Kernel.cpp.

bool init_optimization ( int32_t  count,
int32_t *  IDX,
float64_t weights 
) [virtual]

initialize optimization

Parameters:
count count
IDX index
weights weights
Returns:
if initializing was successful

Reimplemented in CCombinedKernel, CCommUlongStringKernel, CCommWordStringKernel, CLinearKernel, CLinearStringKernel, CWeightedDegreePositionStringKernel, and CWeightedDegreeStringKernel.

Definition at line 788 of file Kernel.cpp.

bool init_optimization_svm ( CSVM svm  ) 

initialize optimization

Parameters:
svm svm model
Returns:
if initializing was successful

Definition at line 850 of file Kernel.cpp.

float64_t kernel ( int32_t  idx_a,
int32_t  idx_b 
)

get kernel function for lhs feature vector a and rhs feature vector b

Parameters:
idx_a index of feature vector a
idx_b index of feature vector b
Returns:
computed kernel function

Definition at line 221 of file Kernel.h.

int32_t kernel_cache_check ( int32_t  cacheidx  ) 

check if row at given index is cached

Parameters:
cacheidx index in cache
Returns:
if row at given index is cached

Definition at line 613 of file Kernel.h.

void kernel_cache_cleanup (  ) 

cleanup kernel cache

Definition at line 544 of file Kernel.cpp.

void kernel_cache_init ( int32_t  size,
bool  regression_hack = false 
)

initialize kernel cache

Parameters:
size size to initialize to
regression_hack if hack for regression shall be applied

Definition at line 161 of file Kernel.cpp.

void kernel_cache_reset_lru (  ) 

kernel cache reset lru

Definition at line 531 of file Kernel.cpp.

void kernel_cache_shrink ( int32_t  totdoc,
int32_t  num_shrink,
int32_t *  after 
)

kernel cache shrink

Parameters:
totdoc totdoc
num_shrink number of shrink
after after

Definition at line 475 of file Kernel.cpp.

int32_t kernel_cache_space_available (  ) 

check if there is room for one more row in kernel cache

Returns:
if there is room for one more row in kernel cache

Definition at line 622 of file Kernel.h.

int32_t kernel_cache_touch ( int32_t  cacheidx  ) 

update lru time of item at given index to avoid removal from cache

Parameters:
cacheidx index in cache
Returns:
if updating was successful

Definition at line 598 of file Kernel.h.

void list_kernel (  ) 

list kernel

Definition at line 684 of file Kernel.cpp.

void load ( CFile loader  ) 

load the kernel matrix

Parameters:
loader File object via which to load data

Definition at line 623 of file Kernel.cpp.

void load_serializable_post (  )  throw (ShogunException) [protected, virtual]

Can (optionally) be overridden to post-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::LOAD_SERIALIZABLE_POST is called.

Exceptions:
ShogunException Will be thrown if an error occurres.

Reimplemented from CSGObject.

Reimplemented in CANOVAKernel, CCircularKernel, CExponentialKernel, CGaussianKernel, CInverseMultiQuadricKernel, and CWeightedDegreePositionStringKernel.

Definition at line 868 of file Kernel.cpp.

void register_params (  )  [protected, 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 in CANOVAKernel, CDistanceKernel, CGaussianMatchStringKernel, CGaussianShortRealKernel, CHistogramIntersectionKernel, CRegulatoryModulesStringKernel, CSNPStringKernel, CSpectrumMismatchRBFKernel, and CTensorProductPairKernel.

Definition at line 891 of file Kernel.cpp.

void remove_lhs (  )  [virtual]
void remove_lhs_and_rhs (  )  [virtual]

remove lhs and rhs from kernel

Reimplemented in CCombinedKernel.

Definition at line 638 of file Kernel.cpp.

void remove_rhs (  )  [virtual]

takes all necessary steps if the rhs is removed from kernel

remove rhs from kernel

Reimplemented in CCombinedKernel, and CCommUlongStringKernel.

Definition at line 669 of file Kernel.cpp.

void resize_kernel_cache ( KERNELCACHE_IDX  size,
bool  regression_hack = false 
)

resize kernel cache

Parameters:
size new size
regression_hack hack for regression

Definition at line 85 of file Kernel.cpp.

void save ( CFile writer  ) 

save kernel matrix

Parameters:
writer File object via which to save data

Definition at line 629 of file Kernel.cpp.

void save_serializable_post (  )  throw (ShogunException) [protected, virtual]

Can (optionally) be overridden to post-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::SAVE_SERIALIZABLE_POST is called.

Exceptions:
ShogunException Will be thrown if an error occurres.

Reimplemented from CSGObject.

Definition at line 883 of file Kernel.cpp.

void save_serializable_pre (  )  throw (ShogunException) [protected, virtual]

Can (optionally) be overridden to pre-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::SAVE_SERIALIZABLE_PRE is called.

Exceptions:
ShogunException Will be thrown if an error occurres.

Reimplemented from CSGObject.

Definition at line 875 of file Kernel.cpp.

void set_cache_size ( int32_t  size  ) 

set the size of the kernel cache

Parameters:
size of kernel cache

Definition at line 510 of file Kernel.h.

void set_combined_kernel_weight ( float64_t  nw  ) 

set combined kernel weight

Parameters:
nw new combined kernel weight

Definition at line 732 of file Kernel.h.

void set_is_initialized ( bool  p_init  )  [protected]

set is initialized

Parameters:
p_init if optimization shall be set to initialized

Definition at line 784 of file Kernel.h.

bool set_normalizer ( CKernelNormalizer normalizer  )  [virtual]

set the current kernel normalizer

Returns:
if successful

Reimplemented in CWeightedDegreeStringKernel.

Definition at line 130 of file Kernel.cpp.

virtual void set_optimization_type ( EOptimizationType  t  )  [virtual]

set optimization type

Parameters:
t optimization type to set

Reimplemented in CCombinedKernel.

Definition at line 671 of file Kernel.h.

void set_property ( EKernelProperty  p  )  [protected]

set property

Parameters:
p kernel property to set

Definition at line 766 of file Kernel.h.

void set_subkernel_weights ( SGVector< float64_t weights  )  [virtual]

set subkernel weights

Parameters:
weights new subkernel weights

Reimplemented in CCombinedKernel, CWeightedDegreePositionStringKernel, and CWeightedDegreeStringKernel.

Definition at line 841 of file Kernel.cpp.

void set_time ( int32_t  t  ) 

set the lru time

Parameters:
t the time to use

Definition at line 588 of file Kernel.h.

void unset_property ( EKernelProperty  p  )  [protected]

unset property

Parameters:
p kernel property to unset

Definition at line 775 of file Kernel.h.


Friends And Related Function Documentation

friend class CAvgDiagKernelNormalizer [friend]

Reimplemented in CCommWordStringKernel.

Definition at line 179 of file Kernel.h.

friend class CDiceKernelNormalizer [friend]

Reimplemented in CCommWordStringKernel.

Definition at line 187 of file Kernel.h.

friend class CFirstElementKernelNormalizer [friend]

Reimplemented in CCommWordStringKernel.

Definition at line 181 of file Kernel.h.

friend class CMultitaskKernelMaskNormalizer [friend]

Definition at line 184 of file Kernel.h.

friend class CMultitaskKernelMaskPairNormalizer [friend]

Definition at line 185 of file Kernel.h.

friend class CMultitaskKernelMklNormalizer [friend]

Definition at line 183 of file Kernel.h.

friend class CMultitaskKernelNormalizer [friend]

Definition at line 182 of file Kernel.h.

friend class CRidgeKernelNormalizer [friend]

Reimplemented in CCommWordStringKernel.

Definition at line 180 of file Kernel.h.

friend class CSqrtDiagKernelNormalizer [friend]

Reimplemented in CCommWordStringKernel.

Definition at line 178 of file Kernel.h.

friend class CTanimotoKernelNormalizer [friend]

Reimplemented in CCommWordStringKernel.

Definition at line 186 of file Kernel.h.

friend class CVarianceKernelNormalizer [friend]

Reimplemented in CCommWordStringKernel.

Definition at line 177 of file Kernel.h.

friend class CZeroMeanCenterKernelNormalizer [friend]

Definition at line 188 of file Kernel.h.


Member Data Documentation

int32_t cache_size [protected]

cache_size in MB

Definition at line 980 of file Kernel.h.

combined kernel weight

Definition at line 1005 of file Kernel.h.

KERNEL_CACHE kernel_cache [protected]

kernel cache

Definition at line 984 of file Kernel.h.

this *COULD* store the whole kernel matrix usually not applicable / necessary to compute the whole matrix

Reimplemented in CSpectrumMismatchRBFKernel, and CSpectrumRBFKernel.

Definition at line 989 of file Kernel.h.

CFeatures* lhs [protected]

feature vectors to occur on left hand side

Definition at line 992 of file Kernel.h.

bool lhs_equals_rhs [protected]

lhs

Definition at line 997 of file Kernel.h.

normalize the kernel(i,j) function based on this normalization function

Definition at line 1019 of file Kernel.h.

int32_t num_lhs [protected]

number of feature vectors on left hand side

Definition at line 1000 of file Kernel.h.

int32_t num_rhs [protected]

number of feature vectors on right hand side

Definition at line 1002 of file Kernel.h.

optimization type (currently FASTBUTMEMHUNGRY and SLOWBUTMEMEFFICIENT)

Definition at line 1012 of file Kernel.h.

bool optimization_initialized [protected]

if optimization is initialized

Definition at line 1008 of file Kernel.h.

uint64_t properties [protected]

kernel properties

Definition at line 1015 of file Kernel.h.

CFeatures* rhs [protected]

feature vectors to occur on right hand side

Definition at line 994 of file Kernel.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