SHOGUN  v3.2.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
KernelNormalizer.h
浏览该文件的文档.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2008-2009 Soeren Sonnenburg
8  * Copyright (C) 2008-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef _KERNELNORMALIZER_H___
12 #define _KERNELNORMALIZER_H___
13 
14 #include <shogun/kernel/Kernel.h>
15 #include <shogun/base/Parameter.h>
16 
17 namespace shogun
18 {
19 
22 {
23  N_REGULAR = 0,
25 };
26 
27 class CKernel;
52 {
53  public:
54 
58  {
60  m_type = N_REGULAR;
61  }
62 
64  virtual ~CKernelNormalizer() { }
65 
68  virtual bool init(CKernel* k)=0;
69 
75  virtual float64_t normalize(
76  float64_t value, int32_t idx_lhs, int32_t idx_rhs)=0;
77 
82  virtual float64_t normalize_lhs(float64_t value, int32_t idx_lhs)=0;
83 
88  virtual float64_t normalize_rhs(float64_t value, int32_t idx_rhs)=0;
89 
92  virtual void register_params()
93  {
94  SG_ADD((machine_int_t*) &m_type, "m_type", "Normalizer type.",
96  }
97 
101  {
102  return m_type;
103  }
104 
109  {
110  m_type = type;
111  }
112 
113  protected:
116 };
117 }
118 #endif
ENormalizerType get_normalizer_type()
void set_normalizer_type(ENormalizerType type)
virtual float64_t normalize_rhs(float64_t value, int32_t idx_rhs)=0
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:102
double float64_t
Definition: common.h:48
The class Kernel Normalizer defines a function to post-process kernel values.
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:16
int machine_int_t
Definition: common.h:57
The Kernel base class.
Definition: Kernel.h:150
#define SG_ADD(...)
Definition: SGObject.h:71
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 void register_params()

SHOGUN Machine Learning Toolbox - Documentation