SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KernelTwoSampleTest.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) 2012-2013 Heiko Strathmann
8  */
9 
10 #ifndef KERNEL_TWO_SAMPLE_TEST_H_
11 #define KERNEL_TWO_SAMPLE_TEST_H_
12 
14 #include <shogun/kernel/Kernel.h>
15 
16 namespace shogun
17 {
18 
19 class CFeatures;
20 class CKernel;
21 
37 {
38  public:
41 
52  CKernelTwoSampleTest(CKernel* kernel, CFeatures* p_and_q,
53  index_t q_start);
54 
67  CFeatures* q);
68 
70  virtual ~CKernelTwoSampleTest();
71 
75  inline virtual void set_kernel(CKernel* kernel)
76  {
77  /* ref before unref to prevent deleting in case objects are the same */
78  SG_REF(kernel);
80  m_kernel=kernel;
81  }
82 
84  inline virtual CKernel* get_kernel()
85  {
87  return m_kernel;
88  }
89 
98 
107  bool multiple_kernels)=0;
108 
110  virtual float64_t compute_statistic()=0;
111 
112  virtual const char* get_name() const=0;
113 
114  private:
115  void init();
116 
117  protected:
120 };
121 
122 }
123 
124 #endif /* KERNEL_TWO_SAMPLE_TEST_H_ */
int32_t index_t
Definition: common.h:60
#define SG_UNREF(x)
Definition: SGRefObject.h:35
virtual float64_t compute_statistic()=0
Kernel two sample test base class. Provides an interface for performing a two-sample test using a ker...
Provides an interface for performing the classical two-sample test i.e. Given samples from two distri...
Definition: TwoSampleTest.h:52
virtual void set_kernel(CKernel *kernel)
double float64_t
Definition: common.h:48
#define SG_REF(x)
Definition: SGRefObject.h:34
virtual SGVector< float64_t > sample_null()
virtual const char * get_name() const =0
The class Features is the base class of all feature objects.
Definition: Features.h:62
The Kernel base class.
Definition: Kernel.h:150

SHOGUN Machine Learning Toolbox - Documentation