SHOGUN  3.2.1
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
PyramidChi2.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 Alexander Binder
8  * Copyright (C) 2008-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef PYRAMIDCHI2_H_
12 #define PYRAMIDCHI2_H_
13 
14 #include <shogun/lib/common.h>
18 
19 namespace shogun
20 {
21  template <class T> class CDenseFeatures;
22 
28 class CPyramidChi2 : public CDotKernel
29 {
30 public:
32  CPyramidChi2();
33 
48  CPyramidChi2(int32_t size, int32_t num_cells2,
49  float64_t* weights_foreach_cell2,
50  int32_t width_computation_type2,
51  float64_t width2);
52 
73  int32_t size, int32_t num_cells2,
74  float64_t* weights_foreach_cell2,
75  int32_t width_computation_type2,
76  float64_t width2 );
77 
83  virtual bool init(CFeatures* l, CFeatures* r);
84 
85 
86  virtual ~CPyramidChi2();
87 
89  virtual void cleanup();
90 
93  {
94  return K_PYRAMIDCHI2;
95  }
96 
98  virtual const char* get_name() const { return "PyramidChi2"; }
99 
100 
114  virtual void setparams_pychi2(int32_t num_cells2,
115  float64_t* weights_foreach_cell2,
116  int32_t width_computation_type2,
117  float64_t width2);
118 
119 protected:
126  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
127 
128 protected:
129 
131  int32_t num_cells;
132 
135 
142 
143 
144 
145 
146 };
147 }
148 #endif /*PYRAMIDCHI2_H_*/
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
EKernelType
Definition: Kernel.h:51
virtual bool init(CFeatures *l, CFeatures *r)
Definition: PyramidChi2.cpp:76
float64_t * weights
Definition: PyramidChi2.h:134
Template class DotKernel is the base class for kernels working on DotFeatures.
Definition: DotKernel.h:29
virtual EKernelType get_kernel_type()
Definition: PyramidChi2.h:92
int32_t width_computation_type
Definition: PyramidChi2.h:137
virtual const char * get_name() const
Definition: PyramidChi2.h:98
double float64_t
Definition: common.h:48
Pyramid Kernel over Chi2 matched histograms.
Definition: PyramidChi2.h:28
virtual void cleanup()
Definition: PyramidChi2.cpp:61
int32_t num_randfeats_forwidthcomputation
Definition: PyramidChi2.h:141
The class Features is the base class of all feature objects.
Definition: Features.h:62
virtual void setparams_pychi2(int32_t num_cells2, float64_t *weights_foreach_cell2, int32_t width_computation_type2, float64_t width2)

SHOGUN 机器学习工具包 - 项目文档