Public Member Functions | Protected Attributes

CFirstElementKernelNormalizer Class Reference


Detailed Description

Normalize the kernel by a constant obtained from the first element of the kernel matrix, i.e. $ c=k({\bf x},{\bf x})$.

\[ k'(x,x')= \frac{k(x,x')}{c} \]

useful if the kernel returns constant elements along the diagonal anyway and all one wants is to scale the kernel down to 1 on the diagonal.

Definition at line 28 of file FirstElementKernelNormalizer.h.

Inheritance diagram for CFirstElementKernelNormalizer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CFirstElementKernelNormalizer ()
virtual ~CFirstElementKernelNormalizer ()
virtual bool init (CKernel *k)
virtual float64_t normalize (float64_t value, int32_t idx_lhs, int32_t idx_rhs)
virtual float64_t normalize_lhs (float64_t value, int32_t idx_lhs)
virtual float64_t normalize_rhs (float64_t value, int32_t idx_rhs)
virtual const char * get_name () const

Protected Attributes

float64_t scale
 scale constant obtained from k(0,0)

Constructor & Destructor Documentation

constructor

Definition at line 33 of file FirstElementKernelNormalizer.h.

virtual ~CFirstElementKernelNormalizer (  )  [virtual]

default destructor

Definition at line 40 of file FirstElementKernelNormalizer.h.


Member Function Documentation

virtual const char* get_name ( void   )  const [virtual]
Returns:
object name

Implements CSGObject.

Definition at line 91 of file FirstElementKernelNormalizer.h.

virtual bool init ( CKernel k  )  [virtual]

initialization of the normalizer (if needed)

Parameters:
k kernel

Implements CKernelNormalizer.

Definition at line 46 of file FirstElementKernelNormalizer.h.

virtual float64_t normalize ( float64_t  value,
int32_t  idx_lhs,
int32_t  idx_rhs 
) [virtual]

normalize the kernel value

Parameters:
value kernel value
idx_lhs index of left hand side vector
idx_rhs index of right hand side vector

Implements CKernelNormalizer.

Definition at line 66 of file FirstElementKernelNormalizer.h.

virtual float64_t normalize_lhs ( float64_t  value,
int32_t  idx_lhs 
) [virtual]

normalize only the left hand side vector

Parameters:
value value of a component of the left hand side feature vector
idx_lhs index of left hand side vector

Implements CKernelNormalizer.

Definition at line 76 of file FirstElementKernelNormalizer.h.

virtual float64_t normalize_rhs ( float64_t  value,
int32_t  idx_rhs 
) [virtual]

normalize only the right hand side vector

Parameters:
value value of a component of the right hand side feature vector
idx_rhs index of right hand side vector

Implements CKernelNormalizer.

Definition at line 85 of file FirstElementKernelNormalizer.h.


Member Data Documentation

float64_t scale [protected]

scale constant obtained from k(0,0)

Definition at line 95 of file FirstElementKernelNormalizer.h.


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

SHOGUN Machine Learning Toolbox - Documentation