SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
KernelTwoSampleTest.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) 2012-2013 Heiko Strathmann
8  */
9 
10 #ifndef KERNEL_TWO_SAMPLE_TEST_H_
11 #define KERNEL_TWO_SAMPLE_TEST_H_
12 
13 #include <shogun/lib/config.h>
14 
16 #include <shogun/kernel/Kernel.h>
17 
18 namespace shogun
19 {
20 
21 class CFeatures;
22 class CKernel;
23 
39 {
40  public:
43 
54  CKernelTwoSampleTest(CKernel* kernel, CFeatures* p_and_q,
55  index_t q_start);
56 
69  CFeatures* q);
70 
72  virtual ~CKernelTwoSampleTest();
73 
77  inline virtual void set_kernel(CKernel* kernel)
78  {
79  /* ref before unref to prevent deleting in case objects are the same */
80  SG_REF(kernel);
82  m_kernel=kernel;
83  }
84 
86  inline virtual CKernel* get_kernel()
87  {
89  return m_kernel;
90  }
91 
100 
109  bool multiple_kernels)=0;
110 
112  virtual float64_t compute_statistic()=0;
113 
114  virtual const char* get_name() const=0;
115 
116  private:
117  void init();
118 
119  protected:
122 };
123 
124 }
125 
126 #endif /* KERNEL_TWO_SAMPLE_TEST_H_ */
int32_t index_t
Definition: common.h:62
virtual float64_t compute_statistic()=0
Kernel two sample test base class. Provides an interface for performing a two-sample test using a ker...
#define SG_REF(x)
Definition: SGObject.h:51
Provides an interface for performing the classical two-sample test i.e. Given samples from two distri...
Definition: TwoSampleTest.h:54
virtual void set_kernel(CKernel *kernel)
double float64_t
Definition: common.h:50
virtual SGVector< float64_t > sample_null()
virtual const char * get_name() const =0
#define SG_UNREF(x)
Definition: SGObject.h:52
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The class Features is the base class of all feature objects.
Definition: Features.h:68
The Kernel base class.
Definition: Kernel.h:158

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