SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PyramidChi2.h
Go to the documentation of this file.
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/config.h>
15 
16 #include <shogun/lib/common.h>
20 
21 namespace shogun
22 {
23  template <class T> class CDenseFeatures;
24 
30 class CPyramidChi2 : public CDotKernel
31 {
32 public:
34  CPyramidChi2();
35 
50  CPyramidChi2(int32_t size, int32_t num_cells2,
51  float64_t* weights_foreach_cell2,
52  int32_t width_computation_type2,
53  float64_t width2);
54 
75  int32_t size, int32_t num_cells2,
76  float64_t* weights_foreach_cell2,
77  int32_t width_computation_type2,
78  float64_t width2 );
79 
85  virtual bool init(CFeatures* l, CFeatures* r);
86 
87 
88  virtual ~CPyramidChi2();
89 
91  virtual void cleanup();
92 
95  {
96  return K_PYRAMIDCHI2;
97  }
98 
100  virtual const char* get_name() const { return "PyramidChi2"; }
101 
102 
116  virtual void setparams_pychi2(int32_t num_cells2,
117  float64_t* weights_foreach_cell2,
118  int32_t width_computation_type2,
119  float64_t width2);
120 
121 protected:
128  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
129 
130 protected:
131 
133  int32_t num_cells;
134 
137 
144 
145 
146 
147 
148 };
149 }
150 #endif /*PYRAMIDCHI2_H_*/
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
EKernelType
Definition: Kernel.h:57
virtual bool init(CFeatures *l, CFeatures *r)
Definition: PyramidChi2.cpp:76
float64_t * weights
Definition: PyramidChi2.h:136
Template class DotKernel is the base class for kernels working on DotFeatures.
Definition: DotKernel.h:31
virtual EKernelType get_kernel_type()
Definition: PyramidChi2.h:94
int32_t width_computation_type
Definition: PyramidChi2.h:139
virtual const char * get_name() const
Definition: PyramidChi2.h:100
double float64_t
Definition: common.h:50
Pyramid Kernel over Chi2 matched histograms.
Definition: PyramidChi2.h:30
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
virtual void cleanup()
Definition: PyramidChi2.cpp:61
int32_t num_randfeats_forwidthcomputation
Definition: PyramidChi2.h:143
The class Features is the base class of all feature objects.
Definition: Features.h:68
virtual void setparams_pychi2(int32_t num_cells2, float64_t *weights_foreach_cell2, int32_t width_computation_type2, float64_t width2)

SHOGUN Machine Learning Toolbox - Documentation