SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
CKernelNormalizer Class Reference

Detailed Description

The class Kernel Normalizer defines a function to post-process kernel values.

Formally it defines f(.,.,.)

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

examples for f(.,.,.) would be scaling with a constant

\[ f(k({\bf x},{\bf x'}), ., .)= \frac{1}{c}\cdot k({\bf x},{\bf x'}) \]

as can be found in class CAvgDiagKernelNormalizer, the identity (cf. CIdentityKernelNormalizer), dividing by the Square Root of the product of the diagonal elements which effectively normalizes the vectors in feature space to norm 1 (see CSqrtDiagKernelNormalizer)

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

Definition at line 51 of file KernelNormalizer.h.

Inheritance diagram for CKernelNormalizer:
Inheritance graph
[legend]

Public Member Functions

 CKernelNormalizer ()
virtual ~CKernelNormalizer ()
virtual bool init (CKernel *k)=0
virtual float64_t normalize (float64_t value, int32_t idx_lhs, int32_t idx_rhs)=0
virtual float64_t normalize_lhs (float64_t value, int32_t idx_lhs)=0
virtual float64_t normalize_rhs (float64_t value, int32_t idx_rhs)=0
virtual void register_params ()
ENormalizerType get_normalizer_type ()
void set_normalizer_type (ENormalizerType type)
- Public Member Functions inherited from CSGObject
 CSGObject ()
 CSGObject (const CSGObject &orig)
virtual ~CSGObject ()
virtual const char * get_name () const =0
virtual bool is_generic (EPrimitiveType *generic) const
template<class T >
void set_generic ()
void unset_generic ()
virtual void print_serializable (const char *prefix="")
virtual bool save_serializable (CSerializableFile *file, const char *prefix="")
virtual bool load_serializable (CSerializableFile *file, const char *prefix="")
void set_global_io (SGIO *io)
SGIOget_global_io ()
void set_global_parallel (Parallel *parallel)
Parallelget_global_parallel ()
void set_global_version (Version *version)
Versionget_global_version ()
SGVector< char * > get_modelsel_names ()
char * get_modsel_param_descr (const char *param_name)
index_t get_modsel_param_index (const char *param_name)

Protected Attributes

ENormalizerType m_type

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
Parallelparallel
Versionversion
Parameterm_parameters
Parameterm_model_selection_parameters
- Protected Member Functions inherited from CSGObject
virtual void load_serializable_pre () throw (ShogunException)
virtual void load_serializable_post () throw (ShogunException)
virtual void save_serializable_pre () throw (ShogunException)
virtual void save_serializable_post () throw (ShogunException)

Constructor & Destructor Documentation

default constructor

Definition at line 57 of file KernelNormalizer.h.

virtual ~CKernelNormalizer ( )
virtual

default destructor

Definition at line 64 of file KernelNormalizer.h.

Member Function Documentation

ENormalizerType get_normalizer_type ( )

getter for normalizer type

Definition at line 99 of file KernelNormalizer.h.

virtual bool init ( CKernel k)
pure virtual
virtual float64_t normalize ( float64_t  value,
int32_t  idx_lhs,
int32_t  idx_rhs 
)
pure virtual
virtual float64_t normalize_lhs ( float64_t  value,
int32_t  idx_lhs 
)
pure virtual
virtual float64_t normalize_rhs ( float64_t  value,
int32_t  idx_rhs 
)
pure virtual
virtual void register_params ( )
virtual

register the parameters

Reimplemented in CMultitaskKernelPlifNormalizer.

Definition at line 92 of file KernelNormalizer.h.

void set_normalizer_type ( ENormalizerType  type)

setter for normalizer type

Parameters
typetype of normalizer

Definition at line 107 of file KernelNormalizer.h.

Member Data Documentation

ENormalizerType m_type
protected

normalizer type

Definition at line 114 of file KernelNormalizer.h.


The documentation for this class was generated from the following file:

SHOGUN Machine Learning Toolbox - Documentation